From 233f4c3a3f2dc719a1b6a288f0aadc6d7c552a7e Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Mon, 5 Aug 2024 17:22:41 +0800 Subject: [PATCH 01/27] bump version --- package-lock.json | 27 +++++++++---------- .../Emitter.Csharp/package.json | 2 +- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index 62bb1b96101..ebbce4f07ec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2271,21 +2271,20 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "0.1.9-alpha.20240731.6", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20240731.6.tgz", - "integrity": "sha512-5tV2Xm4LKzdiPHh1MuWPgBGaXjYmXudjypd/1ReMf3My2SD7TocRSUE8BkI4KJ31aobotIHy2Yi3WsdSQyH5bw==", + "version": "0.1.9-alpha.20240805.2", + "resolved": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNDE0Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240805.2.tgz", "dev": true, "dependencies": { "json-serialize-refs": "0.1.0-0" }, "peerDependencies": { - "@azure-tools/typespec-azure-core": ">=0.36.0 <1.0.0", - "@azure-tools/typespec-client-generator-core": ">=0.36.0 <1.0.0", - "@typespec/compiler": ">=0.50.0 <1.0.0", - "@typespec/http": ">=0.50.0 <1.0.0", - "@typespec/openapi": ">=0.50.0 <1.0.0", - "@typespec/rest": ">=0.50.0 <1.0.0", - "@typespec/versioning": ">=0.50.0 <1.0.0" + "@azure-tools/typespec-azure-core": ">=0.44.0 <1.0.0 || ~0.45.0-0 || ~0.46.0-0", + "@azure-tools/typespec-client-generator-core": ">=0.44.0 <1.0.0 || ~0.45.0-0 || ~0.46.0-0", + "@typespec/compiler": ">=0.58.0 <1.0.0 || ~0.59.0-0 || ~0.60.0-0", + "@typespec/http": ">=0.58.0 <1.0.0 || ~0.59.0-0 || ~0.60.0-0", + "@typespec/openapi": ">=0.58.0 <1.0.0 || ~0.59.0-0 || ~0.60.0-0", + "@typespec/rest": ">=0.58.0 <1.0.0 || ~0.59.0-0 || ~0.60.0-0", + "@typespec/versioning": ">=0.58.0 <1.0.0 || ~0.59.0-0 || ~0.60.0-0" } }, "node_modules/@typespec/json-schema": { @@ -8143,7 +8142,7 @@ "license": "MIT", "dependencies": { "@autorest/csharp": "3.0.0-beta.20240625.4", - "@typespec/http-client-csharp": "0.1.9-alpha.20240731.6", + "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNDE0Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240805.2.tgz", "json-serialize-refs": "0.1.0-0" }, "devDependencies": { @@ -8556,7 +8555,7 @@ "@types/prettier": "^2.6.3", "@typespec/compiler": "0.58.0", "@typespec/http": "0.58.0", - "@typespec/http-client-csharp": "0.1.9-alpha.20240731.6", + "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNDE0Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240805.2.tgz", "@typespec/json-schema": "0.58.0", "@typespec/library-linter": "0.58.0", "@typespec/openapi": "0.58.0", @@ -9759,9 +9758,7 @@ "requires": {} }, "@typespec/http-client-csharp": { - "version": "0.1.9-alpha.20240731.6", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20240731.6.tgz", - "integrity": "sha512-5tV2Xm4LKzdiPHh1MuWPgBGaXjYmXudjypd/1ReMf3My2SD7TocRSUE8BkI4KJ31aobotIHy2Yi3WsdSQyH5bw==", + "version": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNDE0Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240805.2.tgz", "dev": true, "requires": { "json-serialize-refs": "0.1.0-0" diff --git a/src/TypeSpec.Extension/Emitter.Csharp/package.json b/src/TypeSpec.Extension/Emitter.Csharp/package.json index b7a8261a276..192e1d4e204 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/package.json +++ b/src/TypeSpec.Extension/Emitter.Csharp/package.json @@ -36,7 +36,7 @@ "dependencies": { "@autorest/csharp": "3.0.0-beta.20240625.4", "json-serialize-refs": "0.1.0-0", - "@typespec/http-client-csharp": "0.1.9-alpha.20240731.6" + "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNDE0Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240805.2.tgz" }, "peerDependencies": { "@azure-tools/typespec-azure-core": ">=0.36.0 <1.0.0", From 146dce2061250ef2558f23aec7e4db8b2f256df9 Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Tue, 6 Aug 2024 15:36:17 +0800 Subject: [PATCH 02/27] try it on first test --- package-lock.json | 10 +- .../Emitter.Csharp/package.json | 2 +- .../examples/FirstTestTypeSpec_TopAction.json | 15 +++ .../FirstTest-TypeSpec/tspCodeModel.json | 102 ++++++++++++------ .../FirstTest-TypeSpec/tspconfig.yaml | 2 + 5 files changed, 91 insertions(+), 40 deletions(-) create mode 100644 test/TestProjects/FirstTest-TypeSpec/examples/FirstTestTypeSpec_TopAction.json diff --git a/package-lock.json b/package-lock.json index ebbce4f07ec..6d579ea6476 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2271,8 +2271,8 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "0.1.9-alpha.20240805.2", - "resolved": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNDE0Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240805.2.tgz", + "version": "0.1.9-alpha.20240805.46", + "resolved": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNzIwMi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240805.46.tgz", "dev": true, "dependencies": { "json-serialize-refs": "0.1.0-0" @@ -8142,7 +8142,7 @@ "license": "MIT", "dependencies": { "@autorest/csharp": "3.0.0-beta.20240625.4", - "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNDE0Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240805.2.tgz", + "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNzIwMi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240805.46.tgz", "json-serialize-refs": "0.1.0-0" }, "devDependencies": { @@ -8555,7 +8555,7 @@ "@types/prettier": "^2.6.3", "@typespec/compiler": "0.58.0", "@typespec/http": "0.58.0", - "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNDE0Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240805.2.tgz", + "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNzIwMi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240805.46.tgz", "@typespec/json-schema": "0.58.0", "@typespec/library-linter": "0.58.0", "@typespec/openapi": "0.58.0", @@ -9758,7 +9758,7 @@ "requires": {} }, "@typespec/http-client-csharp": { - "version": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNDE0Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240805.2.tgz", + "version": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNzIwMi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240805.46.tgz", "dev": true, "requires": { "json-serialize-refs": "0.1.0-0" diff --git a/src/TypeSpec.Extension/Emitter.Csharp/package.json b/src/TypeSpec.Extension/Emitter.Csharp/package.json index 192e1d4e204..5b64d5fa065 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/package.json +++ b/src/TypeSpec.Extension/Emitter.Csharp/package.json @@ -36,7 +36,7 @@ "dependencies": { "@autorest/csharp": "3.0.0-beta.20240625.4", "json-serialize-refs": "0.1.0-0", - "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNDE0Ny9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240805.2.tgz" + "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNzIwMi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240805.46.tgz" }, "peerDependencies": { "@azure-tools/typespec-azure-core": ">=0.36.0 <1.0.0", diff --git a/test/TestProjects/FirstTest-TypeSpec/examples/FirstTestTypeSpec_TopAction.json b/test/TestProjects/FirstTest-TypeSpec/examples/FirstTestTypeSpec_TopAction.json new file mode 100644 index 00000000000..c606d10dd96 --- /dev/null +++ b/test/TestProjects/FirstTest-TypeSpec/examples/FirstTestTypeSpec_TopAction.json @@ -0,0 +1,15 @@ +{ + "operationId": "FirstTestTypeSpec_TopAction", + "title": "For test topAction", + "parameters": { + "action": "2024-05-06T12:20-12Z" + }, + "responses": { + "200": { + "body": { + "name": "test", + "requiredUnion": ["a", "b", "c"] + } + } + } +} diff --git a/test/TestProjects/FirstTest-TypeSpec/tspCodeModel.json b/test/TestProjects/FirstTest-TypeSpec/tspCodeModel.json index 25f8085df69..b41cdcf2196 100644 --- a/test/TestProjects/FirstTest-TypeSpec/tspCodeModel.json +++ b/test/TestProjects/FirstTest-TypeSpec/tspCodeModel.json @@ -2220,7 +2220,8 @@ "Path": "/top/{action}", "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.topAction" }, { "$id": "301", @@ -2279,7 +2280,8 @@ "Path": "/top2", "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": false + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.topAction2" }, { "$id": "306", @@ -2380,7 +2382,8 @@ ], "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": false + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.patchAction" }, { "$id": "315", @@ -2481,7 +2484,8 @@ ], "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.anonymousBody" }, { "$id": "324", @@ -2582,7 +2586,8 @@ ], "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.friendlyModel" }, { "$id": "333", @@ -2636,7 +2641,8 @@ "Path": "/", "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": false + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.addTimeHeader" }, { "$id": "338", @@ -2732,7 +2738,8 @@ ], "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.stringFormat" }, { "$id": "347", @@ -2833,7 +2840,8 @@ ], "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.projectedNameModel" }, { "$id": "356", @@ -2892,7 +2900,8 @@ "Path": "/retunsAnonymousModel", "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.returnsAnonymousModel" }, { "$id": "361", @@ -2940,7 +2949,8 @@ "Path": "/headAsBoolean/{id}", "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.headAsBoolean" }, { "$id": "365", @@ -3015,7 +3025,8 @@ ], "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.stringBody" }, { "$id": "372", @@ -3090,7 +3101,8 @@ ], "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.boolBody" }, { "$id": "379", @@ -3172,7 +3184,8 @@ ], "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.dateTimeBody" }, { "$id": "387", @@ -3234,7 +3247,8 @@ "Path": "/returnString", "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.returnString" }, { "$id": "393", @@ -3295,7 +3309,8 @@ "Path": "/returnUnknown", "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.returnUnknown" }, { "$id": "399", @@ -3367,7 +3382,8 @@ ], "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.recursiveExtension" }, { "$id": "405", @@ -3439,7 +3455,8 @@ ], "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.threeLevelRecursive" }, { "$id": "411", @@ -3511,7 +3528,8 @@ ], "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.recursiveModels" }, { "$id": "417", @@ -3583,7 +3601,8 @@ ], "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.ContainSelfModels" }, { "$id": "423", @@ -3628,7 +3647,8 @@ "Path": "/enumParameter/{p1}", "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.enumParameter" }, { "$id": "426", @@ -3700,7 +3720,8 @@ ], "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.bodyIsModelWithProjectedEnum" }, { "$id": "432", @@ -3785,7 +3806,8 @@ ], "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.optionalDictionary" }, { "$id": "441", @@ -3905,7 +3927,8 @@ ], "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.azureLocationOp" } ], "Protocol": { @@ -4081,7 +4104,8 @@ "Path": "/hello", "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": false + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.Hello.Demo.sayHi" } ], "Protocol": { @@ -4249,7 +4273,8 @@ ], "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.Hello.Demo2.helloAgain" }, { "$id": "489", @@ -4386,7 +4411,8 @@ ], "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": false + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.Hello.Demo2.noContentType" }, { "$id": "502", @@ -4445,7 +4471,8 @@ "Path": "/demoHi", "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.Hello.Demo2.helloDemoAgain" }, { "$id": "507", @@ -4546,7 +4573,8 @@ ], "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.Hello.Demo2.createLiteral" }, { "$id": "516", @@ -4674,7 +4702,8 @@ "Path": "/helloLiteral/{p2}", "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.Hello.Demo2.helloLiteral" } ], "Protocol": { @@ -4778,7 +4807,8 @@ ], "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": false + "GenerateConvenienceMethod": false, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.EnumTest.createUnknownValue" } ], "Protocol": { @@ -4911,7 +4941,8 @@ ], "BufferResponse": true, "GenerateProtocolMethod": false, - "GenerateConvenienceMethod": true + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.ProtocolAndConvenient.internalProtocol" }, { "$id": "553", @@ -4941,7 +4972,8 @@ "Path": "/stillConvenient", "BufferResponse": true, "GenerateProtocolMethod": false, - "GenerateConvenienceMethod": true + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.ProtocolAndConvenient.stillConvenient" } ], "Protocol": { @@ -5050,7 +5082,8 @@ "Path": "/entity/doSomething/{p2}", "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.Entity.doSomething" } ], "Protocol": { @@ -5177,7 +5210,8 @@ "Path": "/glossary/doSomething/{id}", "BufferResponse": true, "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "FirstTestTypeSpec.Glossary.doSomething" } ], "Protocol": { diff --git a/test/TestProjects/FirstTest-TypeSpec/tspconfig.yaml b/test/TestProjects/FirstTest-TypeSpec/tspconfig.yaml index aec4739c25f..70be69dff7c 100644 --- a/test/TestProjects/FirstTest-TypeSpec/tspconfig.yaml +++ b/test/TestProjects/FirstTest-TypeSpec/tspconfig.yaml @@ -5,3 +5,5 @@ options: deserialize-null-collection-as-null-value: true head-as-boolean: true generate-test-project: true + examples-directory: "{project-root}/examples" + generate-examples: true From ec5ab3fe12fa6e33b06582dc5a32ba22e5bf002a Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Tue, 6 Aug 2024 15:43:20 +0800 Subject: [PATCH 03/27] change the location of example --- .../{ => 2022-05-15-preview}/FirstTestTypeSpec_TopAction.json | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename test/TestProjects/FirstTest-TypeSpec/examples/{ => 2022-05-15-preview}/FirstTestTypeSpec_TopAction.json (100%) diff --git a/test/TestProjects/FirstTest-TypeSpec/examples/FirstTestTypeSpec_TopAction.json b/test/TestProjects/FirstTest-TypeSpec/examples/2022-05-15-preview/FirstTestTypeSpec_TopAction.json similarity index 100% rename from test/TestProjects/FirstTest-TypeSpec/examples/FirstTestTypeSpec_TopAction.json rename to test/TestProjects/FirstTest-TypeSpec/examples/2022-05-15-preview/FirstTestTypeSpec_TopAction.json From 474b3d26cff88b9fbaa201bbf83cd8656e71d632 Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Wed, 7 Aug 2024 15:47:41 +0800 Subject: [PATCH 04/27] update to new version --- package-lock.json | 12 +++++------- src/TypeSpec.Extension/Emitter.Csharp/package.json | 2 +- .../FirstTestTypeSpec_TopAction.json | 2 +- test/TestProjects/FirstTest-TypeSpec/tspconfig.yaml | 1 - 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index af14bb11635..d60fabeb444 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2271,9 +2271,8 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "0.1.9-alpha.20240805.46", - "resolved": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNzIwMi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240805.46.tgz", - "integrity": "sha512-okI6sFWIRNhZQL0DnhKnh9wQ6OD3FBjUkbmYzcV5pqiEuVPGEWYZrChJZmvH6G5AhUPQ2Nmsc4yHPqDCVwDlEw==", + "version": "0.1.9-alpha.20240806.2", + "resolved": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNzM2MS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240806.2.tgz", "dev": true, "dependencies": { "json-serialize-refs": "0.1.0-0" @@ -8143,7 +8142,7 @@ "license": "MIT", "dependencies": { "@autorest/csharp": "3.0.0-beta.20240625.4", - "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNzIwMi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240805.46.tgz", + "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNzM2MS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240806.2.tgz", "json-serialize-refs": "0.1.0-0" }, "devDependencies": { @@ -8556,7 +8555,7 @@ "@types/prettier": "^2.6.3", "@typespec/compiler": "0.58.0", "@typespec/http": "0.58.0", - "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNzIwMi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240805.46.tgz", + "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNzM2MS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240806.2.tgz", "@typespec/json-schema": "0.58.0", "@typespec/library-linter": "0.58.0", "@typespec/openapi": "0.58.0", @@ -9759,8 +9758,7 @@ "requires": {} }, "@typespec/http-client-csharp": { - "version": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNzIwMi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240805.46.tgz", - "integrity": "sha512-okI6sFWIRNhZQL0DnhKnh9wQ6OD3FBjUkbmYzcV5pqiEuVPGEWYZrChJZmvH6G5AhUPQ2Nmsc4yHPqDCVwDlEw==", + "version": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNzM2MS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240806.2.tgz", "dev": true, "requires": { "json-serialize-refs": "0.1.0-0" diff --git a/src/TypeSpec.Extension/Emitter.Csharp/package.json b/src/TypeSpec.Extension/Emitter.Csharp/package.json index 5b64d5fa065..5a02ae49b6f 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/package.json +++ b/src/TypeSpec.Extension/Emitter.Csharp/package.json @@ -36,7 +36,7 @@ "dependencies": { "@autorest/csharp": "3.0.0-beta.20240625.4", "json-serialize-refs": "0.1.0-0", - "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNzIwMi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240805.46.tgz" + "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNzM2MS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240806.2.tgz" }, "peerDependencies": { "@azure-tools/typespec-azure-core": ">=0.36.0 <1.0.0", diff --git a/test/TestProjects/FirstTest-TypeSpec/examples/2022-05-15-preview/FirstTestTypeSpec_TopAction.json b/test/TestProjects/FirstTest-TypeSpec/examples/2022-05-15-preview/FirstTestTypeSpec_TopAction.json index c606d10dd96..ba82e2ee4a1 100644 --- a/test/TestProjects/FirstTest-TypeSpec/examples/2022-05-15-preview/FirstTestTypeSpec_TopAction.json +++ b/test/TestProjects/FirstTest-TypeSpec/examples/2022-05-15-preview/FirstTestTypeSpec_TopAction.json @@ -1,5 +1,5 @@ { - "operationId": "FirstTestTypeSpec_TopAction", + "operationId": "TopAction", "title": "For test topAction", "parameters": { "action": "2024-05-06T12:20-12Z" diff --git a/test/TestProjects/FirstTest-TypeSpec/tspconfig.yaml b/test/TestProjects/FirstTest-TypeSpec/tspconfig.yaml index 70be69dff7c..0aa6a658a74 100644 --- a/test/TestProjects/FirstTest-TypeSpec/tspconfig.yaml +++ b/test/TestProjects/FirstTest-TypeSpec/tspconfig.yaml @@ -6,4 +6,3 @@ options: head-as-boolean: true generate-test-project: true examples-directory: "{project-root}/examples" - generate-examples: true From 5881c15bb9cd8d57a49c347fca06c3d449d650f8 Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Wed, 7 Aug 2024 17:19:25 +0800 Subject: [PATCH 05/27] add new code and refactor old code --- .../Common/Input/CodeModelConverter.cs | 4 +- .../Examples/ExampleMockValueBuilder.cs | 108 +-- .../InputTypes/Examples/InputExampleValue.cs | 24 - .../Examples/InputHttpOperationExample.cs | 10 + .../Examples/InputParameterExample.cs | 4 +- .../InputTypes/Examples/InputTypeExample.cs | 24 + .../TypeSpecInputOperationExampleConverter.cs | 62 ++ .../TypeSpecInputTypeExampleConverter.cs | 144 ++++ .../Common/Input/InputTypes/InputOperation.cs | 9 +- .../TypeSpecInputOperationConverter.cs | 8 +- .../Serialization/TypeSpecSerialization.cs | 6 +- .../Extensions/Snippets.ExampleValues.cs | 34 +- .../Output/OperationMethodChainBuilder.cs | 2 +- .../Output/Samples/DpgOperationSample.cs | 12 +- .../Samples/InputExampleParameterValue.cs | 8 +- .../Extensions/CodeWriterExtensions.cs | 32 +- .../MgmtTest/Models/ExampleParameterValue.cs | 6 +- .../MgmtTest/Models/MockTestCase.cs | 4 +- .../MgmtTest/Models/OperationExample.cs | 2 +- src/AutoRest.CSharp/MgmtTest/Models/Sample.cs | 2 +- .../FirstTest-TypeSpec/tspCodeModel.json | 647 ++++++++++-------- 21 files changed, 718 insertions(+), 434 deletions(-) delete mode 100644 src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputExampleValue.cs create mode 100644 src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputHttpOperationExample.cs create mode 100644 src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputTypeExample.cs create mode 100644 src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputOperationExampleConverter.cs create mode 100644 src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputTypeExampleConverter.cs diff --git a/src/AutoRest.CSharp/Common/Input/CodeModelConverter.cs b/src/AutoRest.CSharp/Common/Input/CodeModelConverter.cs index ad57424354d..5f3eff87164 100644 --- a/src/AutoRest.CSharp/Common/Input/CodeModelConverter.cs +++ b/src/AutoRest.CSharp/Common/Input/CodeModelConverter.cs @@ -190,7 +190,7 @@ private IReadOnlyList CreateOperationExamples(InputOperat return result; } - private InputExampleValue CreateExampleValue(ExampleValue exampleValue) + private InputTypeExample CreateExampleValue(ExampleValue exampleValue) { var inputType = CreateType(exampleValue.Schema, exampleValue.Schema.Extensions?.Format, false); if (exampleValue.RawValue != null) @@ -203,7 +203,7 @@ private InputExampleValue CreateExampleValue(ExampleValue exampleValue) } if (exampleValue.Properties is null) { - return InputExampleValue.Null(inputType); + return InputTypeExample.Null(inputType); } else { diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/ExampleMockValueBuilder.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/ExampleMockValueBuilder.cs index 031d628897f..2ce8fb4a32e 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/ExampleMockValueBuilder.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/ExampleMockValueBuilder.cs @@ -15,7 +15,7 @@ internal class ExampleMockValueBuilder private static readonly string EndpointMockValue = Configuration.ApiTypes.EndPointSampleValue; - private readonly static ConcurrentDictionary _cache = new(); + private readonly static ConcurrentDictionary _cache = new(); public static InputClientExample BuildClientExample(InputClient client, bool useAllParameters) { @@ -57,30 +57,30 @@ private static InputParameterExample BuildParameterExample(InputParameter parame // if the parameter is constant, we just put the constant into the example value instead of mocking a new one if (parameter.Kind == InputOperationParameterKind.Constant) { - InputExampleValue value; + InputTypeExample value; if (parameter.Type is InputLiteralType { Value: not null } literalValue) { - value = InputExampleValue.Value(parameter.Type, literalValue.Value); + value = InputTypeExample.Value(parameter.Type, literalValue.Value); } else if (parameter.DefaultValue != null) { // when it is constant, it could have DefaultValue - value = InputExampleValue.Value(parameter.Type, parameter.DefaultValue.Value); + value = InputTypeExample.Value(parameter.Type, parameter.DefaultValue.Value); } else if (parameter.Type is InputUnionType unionType && unionType.VariantTypes[0] is InputLiteralType literalType) { // or it could be a union of literal types - value = InputExampleValue.Value(parameter.Type, literalType.Value); + value = InputTypeExample.Value(parameter.Type, literalType.Value); } else if (parameter.Type is InputEnumType enumType && enumType.Values[0].Value is { } enumValue) { // or it could be an enum of a few values - value = InputExampleValue.Value(parameter.Type, enumValue); + value = InputTypeExample.Value(parameter.Type, enumValue); } else { // fallback to null - value = InputExampleValue.Null(parameter.Type); + value = InputTypeExample.Null(parameter.Type); } return new(parameter, value); } @@ -88,13 +88,13 @@ private static InputParameterExample BuildParameterExample(InputParameter parame // if the parameter is endpoint if (parameter.IsEndpoint) { - var value = InputExampleValue.Value(parameter.Type, EndpointMockValue); + var value = InputTypeExample.Value(parameter.Type, EndpointMockValue); return new(parameter, value); } if (parameter.DefaultValue != null) { - var value = InputExampleValue.Value(parameter.Type, parameter.DefaultValue.Value); + var value = InputTypeExample.Value(parameter.Type, parameter.DefaultValue.Value); return new(parameter, value); } @@ -102,94 +102,94 @@ private static InputParameterExample BuildParameterExample(InputParameter parame return new(parameter, exampleValue); } - private static InputExampleValue BuildExampleValue(InputType type, string? hint, bool useAllParameters, HashSet visitedModels) => type switch + private static InputTypeExample BuildExampleValue(InputType type, string? hint, bool useAllParameters, HashSet visitedModels) => type switch { InputListType listType => BuildListExampleValue(listType, hint, useAllParameters, visitedModels), InputDictionaryType dictionaryType => BuildDictionaryExampleValue(dictionaryType, hint, useAllParameters, visitedModels), InputEnumType enumType => BuildEnumExampleValue(enumType), InputPrimitiveType primitiveType => BuildPrimitiveExampleValue(primitiveType, hint), - InputLiteralType literalType => InputExampleValue.Value(literalType, literalType.Value), + InputLiteralType literalType => InputTypeExample.Value(literalType, literalType.Value), InputModelType modelType => BuildModelExampleValue(modelType, useAllParameters, visitedModels), InputUnionType unionType => BuildExampleValue(unionType.VariantTypes[0], hint, useAllParameters, visitedModels), InputNullableType nullableType => BuildExampleValue(nullableType.Type, hint, useAllParameters, visitedModels), InputDateTimeType dateTimeType => BuildDateTimeExampleValue(dateTimeType), InputDurationType durationType => BuildDurationExampleValue(durationType), - _ => InputExampleValue.Object(type, new Dictionary()) + _ => InputTypeExample.Object(type, new Dictionary()) }; - private static InputExampleValue BuildListExampleValue(InputListType listType, string? hint, bool useAllParameters, HashSet visitedModels) + private static InputTypeExample BuildListExampleValue(InputListType listType, string? hint, bool useAllParameters, HashSet visitedModels) { var exampleElementValue = BuildExampleValue(listType.ValueType, hint, useAllParameters, visitedModels); - return InputExampleValue.List(listType, new[] { exampleElementValue }); + return InputTypeExample.List(listType, new[] { exampleElementValue }); } - private static InputExampleValue BuildDictionaryExampleValue(InputDictionaryType dictionaryType, string? hint, bool useAllParameters, HashSet visitedModels) + private static InputTypeExample BuildDictionaryExampleValue(InputDictionaryType dictionaryType, string? hint, bool useAllParameters, HashSet visitedModels) { var exampleValue = BuildExampleValue(dictionaryType.ValueType, hint, useAllParameters, visitedModels); - return InputExampleValue.Object(dictionaryType, new Dictionary + return InputTypeExample.Object(dictionaryType, new Dictionary { ["key"] = exampleValue }); } - private static InputExampleValue BuildEnumExampleValue(InputEnumType enumType) + private static InputTypeExample BuildEnumExampleValue(InputEnumType enumType) { var enumValue = enumType.Values.First(); - return InputExampleValue.Value(enumType, enumValue.Value); + return InputTypeExample.Value(enumType, enumValue.Value); } - private static InputExampleValue BuildPrimitiveExampleValue(InputPrimitiveType primitiveType, string? hint) => primitiveType.Kind switch + private static InputTypeExample BuildPrimitiveExampleValue(InputPrimitiveType primitiveType, string? hint) => primitiveType.Kind switch { - InputPrimitiveTypeKind.Stream => InputExampleValue.Stream(primitiveType, ""), - InputPrimitiveTypeKind.Boolean => InputExampleValue.Value(primitiveType, true), - InputPrimitiveTypeKind.PlainDate => InputExampleValue.Value(primitiveType, "2022-05-10"), - InputPrimitiveTypeKind.Float32 => InputExampleValue.Value(primitiveType, 123.45f), - InputPrimitiveTypeKind.Float64 => InputExampleValue.Value(primitiveType, 123.45d), - InputPrimitiveTypeKind.Decimal or InputPrimitiveTypeKind.Decimal128 => InputExampleValue.Value(primitiveType, 123.45m), - InputPrimitiveTypeKind.Int8 => InputExampleValue.Value(primitiveType, (sbyte)123), - InputPrimitiveTypeKind.UInt8 => InputExampleValue.Value(primitiveType, (byte)123), - InputPrimitiveTypeKind.Int32 => InputExampleValue.Value(primitiveType, 1234), - InputPrimitiveTypeKind.Int64 => InputExampleValue.Value(primitiveType, 1234L), - InputPrimitiveTypeKind.SafeInt => InputExampleValue.Value(primitiveType, 1234L), + InputPrimitiveTypeKind.Stream => InputTypeExample.Stream(primitiveType, ""), + InputPrimitiveTypeKind.Boolean => InputTypeExample.Value(primitiveType, true), + InputPrimitiveTypeKind.PlainDate => InputTypeExample.Value(primitiveType, "2022-05-10"), + InputPrimitiveTypeKind.Float32 => InputTypeExample.Value(primitiveType, 123.45f), + InputPrimitiveTypeKind.Float64 => InputTypeExample.Value(primitiveType, 123.45d), + InputPrimitiveTypeKind.Decimal or InputPrimitiveTypeKind.Decimal128 => InputTypeExample.Value(primitiveType, 123.45m), + InputPrimitiveTypeKind.Int8 => InputTypeExample.Value(primitiveType, (sbyte)123), + InputPrimitiveTypeKind.UInt8 => InputTypeExample.Value(primitiveType, (byte)123), + InputPrimitiveTypeKind.Int32 => InputTypeExample.Value(primitiveType, 1234), + InputPrimitiveTypeKind.Int64 => InputTypeExample.Value(primitiveType, 1234L), + InputPrimitiveTypeKind.SafeInt => InputTypeExample.Value(primitiveType, 1234L), InputPrimitiveTypeKind.String => primitiveType.CrossLanguageDefinitionId switch { - InputPrimitiveType.UuidId => InputExampleValue.Value(primitiveType, "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - _ => string.IsNullOrWhiteSpace(hint) ? InputExampleValue.Value(primitiveType, "") : InputExampleValue.Value(primitiveType, $"<{hint}>") + InputPrimitiveType.UuidId => InputTypeExample.Value(primitiveType, "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + _ => string.IsNullOrWhiteSpace(hint) ? InputTypeExample.Value(primitiveType, "") : InputTypeExample.Value(primitiveType, $"<{hint}>") }, - InputPrimitiveTypeKind.PlainTime => InputExampleValue.Value(primitiveType, "01:23:45"), - InputPrimitiveTypeKind.Url => InputExampleValue.Value(primitiveType, "http://localhost:3000"), - _ => InputExampleValue.Object(primitiveType, new Dictionary()) + InputPrimitiveTypeKind.PlainTime => InputTypeExample.Value(primitiveType, "01:23:45"), + InputPrimitiveTypeKind.Url => InputTypeExample.Value(primitiveType, "http://localhost:3000"), + _ => InputTypeExample.Object(primitiveType, new Dictionary()) }; - private static InputExampleValue BuildDateTimeExampleValue(InputDateTimeType dateTimeType) => dateTimeType.Encode switch + private static InputTypeExample BuildDateTimeExampleValue(InputDateTimeType dateTimeType) => dateTimeType.Encode switch { - DateTimeKnownEncoding.Rfc7231 => InputExampleValue.Value(dateTimeType.WireType, "Tue, 10 May 2022 18:57:31 GMT"), - DateTimeKnownEncoding.Rfc3339 => InputExampleValue.Value(dateTimeType.WireType, "2022-05-10T18:57:31.2311892Z"), - DateTimeKnownEncoding.UnixTimestamp => InputExampleValue.Value(dateTimeType.WireType, 1652209051), - _ => InputExampleValue.Null(dateTimeType) + DateTimeKnownEncoding.Rfc7231 => InputTypeExample.Value(dateTimeType.WireType, "Tue, 10 May 2022 18:57:31 GMT"), + DateTimeKnownEncoding.Rfc3339 => InputTypeExample.Value(dateTimeType.WireType, "2022-05-10T18:57:31.2311892Z"), + DateTimeKnownEncoding.UnixTimestamp => InputTypeExample.Value(dateTimeType.WireType, 1652209051), + _ => InputTypeExample.Null(dateTimeType) }; - private static InputExampleValue BuildDurationExampleValue(InputDurationType durationType) => durationType.Encode switch + private static InputTypeExample BuildDurationExampleValue(InputDurationType durationType) => durationType.Encode switch { - DurationKnownEncoding.Iso8601 => InputExampleValue.Value(durationType.WireType, "PT1H23M45S"), + DurationKnownEncoding.Iso8601 => InputTypeExample.Value(durationType.WireType, "PT1H23M45S"), DurationKnownEncoding.Seconds => durationType.WireType.Kind switch { - InputPrimitiveTypeKind.Int32 => InputExampleValue.Value(durationType.WireType, 10), - InputPrimitiveTypeKind.Float or InputPrimitiveTypeKind.Float32 => InputExampleValue.Value(durationType.WireType, 10f), - _ => InputExampleValue.Value(durationType.WireType, 3.141592) + InputPrimitiveTypeKind.Int32 => InputTypeExample.Value(durationType.WireType, 10), + InputPrimitiveTypeKind.Float or InputPrimitiveTypeKind.Float32 => InputTypeExample.Value(durationType.WireType, 10f), + _ => InputTypeExample.Value(durationType.WireType, 3.141592) }, - _ => InputExampleValue.Null(durationType) + _ => InputTypeExample.Null(durationType) }; - private static InputExampleValue BuildModelExampleValue(InputModelType model, bool useAllParameters, HashSet visitedModels) + private static InputTypeExample BuildModelExampleValue(InputModelType model, bool useAllParameters, HashSet visitedModels) { if (visitedModels.Contains(model)) - return InputExampleValue.Null(model); + return InputTypeExample.Null(model); - var dict = new Dictionary(); - var result = InputExampleValue.Object(model, dict); + var dict = new Dictionary(); + var result = InputTypeExample.Object(model, dict); visitedModels.Add(model); // if this model has a discriminator, we should return a derived type if (model.DiscriminatorProperty != null) @@ -197,7 +197,7 @@ private static InputExampleValue BuildModelExampleValue(InputModelType model, bo var derived = model.DerivedModels.FirstOrDefault(); if (derived is null) { - return InputExampleValue.Null(model); + return InputTypeExample.Null(model); } else { @@ -220,14 +220,14 @@ private static InputExampleValue BuildModelExampleValue(InputModelType model, bo if (dict.ContainsKey(property.SerializedName)) continue; - InputExampleValue exampleValue; + InputTypeExample exampleValue; if (property.IsDiscriminator) { - exampleValue = InputExampleValue.Value(property.Type, model.DiscriminatorValue!); + exampleValue = InputTypeExample.Value(property.Type, model.DiscriminatorValue!); } else if (property.ConstantValue is { Value: { } constantValue }) { - exampleValue = InputExampleValue.Value(property.Type, constantValue); + exampleValue = InputTypeExample.Value(property.Type, constantValue); } else { diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputExampleValue.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputExampleValue.cs deleted file mode 100644 index 639aea28e66..00000000000 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputExampleValue.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -using System.Collections.Generic; - -namespace AutoRest.CSharp.Common.Input.Examples -{ - internal abstract record InputExampleValue(InputType Type) - { - public static InputExampleValue Null(InputType type) => new InputExampleRawValue(type, null); - public static InputExampleValue Value(InputType type, object? rawValue) => new InputExampleRawValue(type, rawValue); - public static InputExampleValue List(InputType type, IReadOnlyList values) => new InputExampleListValue(type, values); - public static InputExampleValue Object(InputType type, IReadOnlyDictionary properties) => new InputExampleObjectValue(type, properties); - public static InputExampleValue Stream(InputType type, string filename) => new InputExampleStreamValue(type, filename); - } - - internal record InputExampleRawValue(InputType Type, object? RawValue) : InputExampleValue(Type); - - internal record InputExampleListValue(InputType Type, IReadOnlyList Values) : InputExampleValue(Type); - - internal record InputExampleObjectValue(InputType Type, IReadOnlyDictionary Values): InputExampleValue(Type); - - internal record InputExampleStreamValue(InputType Type, string Filename): InputExampleValue(Type); -} diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputHttpOperationExample.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputHttpOperationExample.cs new file mode 100644 index 00000000000..94232b974d0 --- /dev/null +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputHttpOperationExample.cs @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System.Collections.Generic; + +namespace AutoRest.CSharp.Common.Input.Examples +{ + // TODO -- currently we do not need the responses. In the case that in the future we need to handle the responses in examples, we need to add a new class InputExampleResponse and a new property here + internal record InputHttpOperationExample(string Name, string? Description, string FilePath, IReadOnlyList Parameters); +} diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputParameterExample.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputParameterExample.cs index af1e76c4ccd..7a92174f61a 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputParameterExample.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputParameterExample.cs @@ -1,9 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -using System.Collections.Generic; - namespace AutoRest.CSharp.Common.Input.Examples { - internal record InputParameterExample(InputParameter Parameter, InputExampleValue ExampleValue); + internal record InputParameterExample(InputParameter Parameter, InputTypeExample ExampleValue); } diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputTypeExample.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputTypeExample.cs new file mode 100644 index 00000000000..34c008ddd4c --- /dev/null +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputTypeExample.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System.Collections.Generic; + +namespace AutoRest.CSharp.Common.Input.Examples +{ + internal abstract record InputTypeExample(InputType Type) + { + public static InputTypeExample Null(InputType type) => new InputExampleRawValue(type, null); + public static InputTypeExample Value(InputType type, object? rawValue) => new InputExampleRawValue(type, rawValue); + public static InputTypeExample List(InputType type, IReadOnlyList values) => new InputExampleListValue(type, values); + public static InputTypeExample Object(InputType type, IReadOnlyDictionary properties) => new InputExampleObjectValue(type, properties); + public static InputTypeExample Stream(InputType type, string filename) => new InputExampleStreamValue(type, filename); + } + + internal record InputExampleRawValue(InputType Type, object? RawValue) : InputTypeExample(Type); + + internal record InputExampleListValue(InputType Type, IReadOnlyList Values) : InputTypeExample(Type); + + internal record InputExampleObjectValue(InputType Type, IReadOnlyDictionary Values): InputTypeExample(Type); // TODO -- split this into model and dict + + internal record InputExampleStreamValue(InputType Type, string Filename): InputTypeExample(Type); +} diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputOperationExampleConverter.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputOperationExampleConverter.cs new file mode 100644 index 00000000000..6c5f38ea230 --- /dev/null +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputOperationExampleConverter.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace AutoRest.CSharp.Common.Input.Examples +{ + internal sealed class TypeSpecInputOperationExampleConverter : JsonConverter + { + private const string KindPropertyName = "kind"; + + private readonly TypeSpecReferenceHandler _referenceHandler; + + public TypeSpecInputOperationExampleConverter(TypeSpecReferenceHandler referenceHandler) + { + _referenceHandler = referenceHandler; + } + + public override InputHttpOperationExample? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return reader.ReadReferenceAndResolve(_referenceHandler.CurrentResolver) ?? CreateInputHttpOperationExample(ref reader, options); + } + + public override void Write(Utf8JsonWriter writer, InputHttpOperationExample value, JsonSerializerOptions options) + => throw new NotSupportedException("Writing not supported"); + + private InputHttpOperationExample CreateInputHttpOperationExample(ref Utf8JsonReader reader, JsonSerializerOptions options) + { + var isFirstProperty = true; + string? id = null; + string? name = null; + string? description = null; + string? filePath = null; + IReadOnlyList? parameters = null; + while (reader.TokenType != JsonTokenType.EndObject) + { + var isKnownProperty = reader.TryReadReferenceId(ref isFirstProperty, ref id) + || reader.TryReadString("name", ref name) + || reader.TryReadString("description", ref description) + || reader.TryReadString("filePath", ref filePath) + || reader.TryReadWithConverter("parameters", options, ref parameters); + + if (!isKnownProperty) + { + reader.SkipProperty(); + } + } + + var result = new InputHttpOperationExample(name ?? throw new JsonException(), description, filePath ?? throw new JsonException(), parameters ?? throw new JsonException()); + + if (id != null) + { + _referenceHandler.CurrentResolver.AddReference(id, result); + } + + return result; + } + } +} diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputTypeExampleConverter.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputTypeExampleConverter.cs new file mode 100644 index 00000000000..e72693e8624 --- /dev/null +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputTypeExampleConverter.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace AutoRest.CSharp.Common.Input.Examples +{ + internal sealed class TypeSpecInputTypeExampleConverter : JsonConverter + { + private const string KindPropertyName = "kind"; + + private readonly TypeSpecReferenceHandler _referenceHandler; + + public TypeSpecInputTypeExampleConverter(TypeSpecReferenceHandler referenceHandler) + { + _referenceHandler = referenceHandler; + } + + public override InputTypeExample? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return reader.ReadReferenceAndResolve(_referenceHandler.CurrentResolver) ?? CreateObject(ref reader, options); + } + + public override void Write(Utf8JsonWriter writer, InputTypeExample value, JsonSerializerOptions options) + => throw new NotSupportedException("Writing not supported"); + + private InputTypeExample CreateObject(ref Utf8JsonReader reader, JsonSerializerOptions options) + { + string? id = null; + string? kind = null; + InputTypeExample? result = null; + var isFirstProperty = true; + while (reader.TokenType != JsonTokenType.EndObject) + { + var isIdOrKind = reader.TryReadReferenceId(ref isFirstProperty, ref id) + || reader.TryReadString(KindPropertyName, ref kind); + + if (isIdOrKind) + { + continue; + } + result = CreateDerivedType(ref reader, id, kind, options); + } + + return result ?? CreateDerivedType(ref reader, id, kind, options); + } + + private const string ModelKind = "model"; + private const string ArrayKind = "array"; + private const string DictionaryKind = "dict"; + + private InputTypeExample CreateDerivedType(ref Utf8JsonReader reader, string? id, string? kind, JsonSerializerOptions options) => kind switch + { + null => throw new JsonException($"InputTypeExample (id: '{id}') must have a 'kind' property"), + ArrayKind => CreateArrayExample(ref reader, id, options, _referenceHandler.CurrentResolver), + DictionaryKind or ModelKind => CreateObjectExample(ref reader, id, options, _referenceHandler.CurrentResolver), + _ => CreateOtherExample(ref reader, id, options, _referenceHandler.CurrentResolver), + }; + + private InputTypeExample CreateArrayExample(ref Utf8JsonReader reader, string? id, JsonSerializerOptions options, ReferenceResolver referenceResolver) + { + bool isFirstProperty = id == null; + InputType? type = null; + IReadOnlyList? value = null; + while (reader.TokenType != JsonTokenType.EndObject) + { + var isKnownProperty = reader.TryReadReferenceId(ref isFirstProperty, ref id) + || reader.TryReadWithConverter("type", options, ref type) + || reader.TryReadWithConverter("value", options, ref value); + + if (!isKnownProperty) + { + reader.SkipProperty(); + } + } + + var result = new InputExampleListValue(type ?? throw new JsonException(), value ?? throw new JsonException()); + + if (id != null) + { + referenceResolver.AddReference(id, result); + } + + return result; + } + + private InputTypeExample CreateObjectExample(ref Utf8JsonReader reader, string? id, JsonSerializerOptions options, ReferenceResolver referenceResolver) + { + bool isFirstProperty = id == null; + InputType? type = null; + IReadOnlyDictionary? value = null; + while (reader.TokenType != JsonTokenType.EndObject) + { + var isKnownProperty = reader.TryReadReferenceId(ref isFirstProperty, ref id) + || reader.TryReadWithConverter("type", options, ref type) + || reader.TryReadWithConverter("value", options, ref value); + + if (!isKnownProperty) + { + reader.SkipProperty(); + } + } + + var result = new InputExampleObjectValue(type ?? throw new JsonException(), value ?? throw new JsonException()); + + if (id != null) + { + referenceResolver.AddReference(id, result); + } + + return result; + } + + private InputTypeExample CreateOtherExample(ref Utf8JsonReader reader, string? id, JsonSerializerOptions options, ReferenceResolver referenceResolver) + { + bool isFirstProperty = id == null; + InputType? type = null; + object? value = null; + while (reader.TokenType != JsonTokenType.EndObject) + { + var isKnownProperty = reader.TryReadReferenceId(ref isFirstProperty, ref id) + || reader.TryReadWithConverter("type", options, ref type) + || reader.TryReadWithConverter("value", options, ref value); + + if (!isKnownProperty) + { + reader.SkipProperty(); + } + } + + var result = new InputExampleRawValue(type ?? throw new JsonException(), value); + + if (id != null) + { + referenceResolver.AddReference(id, result); + } + + return result; + } + } +} diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/InputOperation.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/InputOperation.cs index 35ab22b1296..ab32efaff5e 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/InputOperation.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/InputOperation.cs @@ -33,7 +33,8 @@ public InputOperation( bool generateProtocolMethod, bool generateConvenienceMethod, string crossLanguageDefinitionId, - bool keepClientDefaultValue) + bool keepClientDefaultValue, + IReadOnlyList? examples = null) { Name = name; SpecName = name; @@ -57,6 +58,7 @@ public InputOperation( GenerateConvenienceMethod = generateConvenienceMethod; CrossLanguageDefinitionId = crossLanguageDefinitionId; KeepClientDefaultValue = keepClientDefaultValue; + Examples = examples ?? Array.Empty(); } public InputOperation() : this( @@ -115,8 +117,11 @@ public static InputOperation RemoveApiVersionParam(InputOperation operation) } public string CleanName => Name.IsNullOrEmpty() ? string.Empty : Name.ToCleanName(); + + public IReadOnlyList Examples { get; } + private readonly Dictionary _examples = new(); - public IReadOnlyDictionary Examples => _examples.Any() ? _examples : EnsureExamples(_examples); + public IReadOnlyDictionary MockExamples => _examples.Any() ? _examples : EnsureExamples(_examples); public IReadOnlyList CodeModelExamples { get; internal set; } = new List(); private IReadOnlyDictionary EnsureExamples(Dictionary examples) diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecInputOperationConverter.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecInputOperationConverter.cs index 09e38d12e06..f63c98f906f 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecInputOperationConverter.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecInputOperationConverter.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.Text.Json; using System.Text.Json.Serialization; -using AutoRest.CSharp.Utilities; +using AutoRest.CSharp.Common.Input.Examples; using Azure.Core; using Humanizer; @@ -49,6 +49,7 @@ public static InputOperation CreateOperation(ref Utf8JsonReader reader, string? bool generateConvenienceMethod = false; string? crossLanguageDefinitionId = null; bool keepClientDefaultValue = false; + IReadOnlyList? examples = null; while (reader.TokenType != JsonTokenType.EndObject) { @@ -73,7 +74,8 @@ public static InputOperation CreateOperation(ref Utf8JsonReader reader, string? || reader.TryReadBoolean(nameof(InputOperation.GenerateProtocolMethod), ref generateProtocolMethod) || reader.TryReadBoolean(nameof(InputOperation.GenerateConvenienceMethod), ref generateConvenienceMethod) || reader.TryReadString(nameof(InputOperation.CrossLanguageDefinitionId), ref crossLanguageDefinitionId) - || reader.TryReadBoolean(nameof(InputOperation.KeepClientDefaultValue), ref keepClientDefaultValue); + || reader.TryReadBoolean(nameof(InputOperation.KeepClientDefaultValue), ref keepClientDefaultValue) + || reader.TryReadWithConverter(nameof(InputOperation.Examples), options, ref examples); if (!isKnownProperty) { @@ -93,7 +95,7 @@ public static InputOperation CreateOperation(ref Utf8JsonReader reader, string? parameters = parameters ?? throw new JsonException("InputOperation must have parameters"); responses = responses ?? throw new JsonException("InputOperation must have responses"); - var inputOperation = new InputOperation(name, resourceName, summary, deprecated, description, accessibility, parameters, responses, httpMethod, requestBodyMediaType, uri, path, externalDocsUri, requestMediaTypes, bufferResponse, longRunning, paging, generateProtocolMethod, generateConvenienceMethod, crossLanguageDefinitionId, keepClientDefaultValue) + var inputOperation = new InputOperation(name, resourceName, summary, deprecated, description, accessibility, parameters, responses, httpMethod, requestBodyMediaType, uri, path, externalDocsUri, requestMediaTypes, bufferResponse, longRunning, paging, generateProtocolMethod, generateConvenienceMethod, crossLanguageDefinitionId, keepClientDefaultValue, examples) { IsNameChanged = IsNameChanged(crossLanguageDefinitionId, name) }; diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecSerialization.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecSerialization.cs index dc4d7dd326f..1d9e08b92db 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecSerialization.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecSerialization.cs @@ -2,8 +2,10 @@ // Licensed under the MIT License. See License.txt in the project root for license information. using System; +using System.ComponentModel; using System.Text.Json; using System.Text.Json.Serialization; +using AutoRest.CSharp.Common.Input.Examples; using Azure.Core; namespace AutoRest.CSharp.Common.Input @@ -36,7 +38,9 @@ internal static class TypeSpecSerialization new TypeSpecInputClientConverter(referenceHandler), new TypeSpecInputDateTimeTypeConverter(referenceHandler), new TypeSpecInputDurationTypeConverter(referenceHandler), - new TypeSpecInputPrimitiveTypeConverter(referenceHandler) + new TypeSpecInputPrimitiveTypeConverter(referenceHandler), + new TypeSpecInputTypeExampleConverter(referenceHandler), + new TypeSpecInputOperationExampleConverter(referenceHandler) } }; diff --git a/src/AutoRest.CSharp/LowLevel/Extensions/Snippets.ExampleValues.cs b/src/AutoRest.CSharp/LowLevel/Extensions/Snippets.ExampleValues.cs index 112756b0ad4..fc9acb77651 100644 --- a/src/AutoRest.CSharp/LowLevel/Extensions/Snippets.ExampleValues.cs +++ b/src/AutoRest.CSharp/LowLevel/Extensions/Snippets.ExampleValues.cs @@ -25,7 +25,7 @@ namespace AutoRest.CSharp.LowLevel.Extensions { internal static partial class ExampleValueSnippets { - private static ValueExpression GetExpression(CSharpType type, InputExampleValue exampleValue, SerializationFormat serializationFormat, bool includeCollectionInitialization = true) + private static ValueExpression GetExpression(CSharpType type, InputTypeExample exampleValue, SerializationFormat serializationFormat, bool includeCollectionInitialization = true) => type switch { { IsReadOnlyMemory: true } => GetExpressionForList(type, exampleValue, serializationFormat, true), @@ -36,7 +36,7 @@ private static ValueExpression GetExpression(CSharpType type, InputExampleValue _ => GetExpressionForTypeProvider(type, exampleValue) }; - private static ValueExpression GetExpressionForFrameworkType(Type frameworkType, InputExampleValue exampleValue, SerializationFormat serializationFormat, bool includeCollectionInitialization = true) + private static ValueExpression GetExpressionForFrameworkType(Type frameworkType, InputTypeExample exampleValue, SerializationFormat serializationFormat, bool includeCollectionInitialization = true) { // handle objects - we usually do not generate object types, but for some rare cases (such as union type) we generate object // and we get this case in the free form object initialization as well @@ -201,7 +201,7 @@ public static ValueExpression GetExpression(InputExampleParameterValue examplePa throw new InvalidOperationException("this should never happen"); } - private static ValueExpression GetExpressionForRequestContent(InputExampleValue value) + private static ValueExpression GetExpressionForRequestContent(InputTypeExample value) { if (value is InputExampleRawValue rawValue && rawValue.RawValue == null) { @@ -214,13 +214,13 @@ private static ValueExpression GetExpressionForRequestContent(InputExampleValue } } - private static ValueExpression GetExpressionForList(CSharpType listType, InputExampleValue exampleValue, SerializationFormat serializationFormat, bool includeCollectionInitialization = true) + private static ValueExpression GetExpressionForList(CSharpType listType, InputTypeExample exampleValue, SerializationFormat serializationFormat, bool includeCollectionInitialization = true) { var exampleListValue = exampleValue as InputExampleListValue; var elementType = listType.ElementType; var elementExpressions = new List(); // the collections in our generated SDK could never be assigned to, therefore if we have null value here, we can only assign an empty collection - foreach (var itemValue in exampleListValue?.Values ?? Enumerable.Empty()) + foreach (var itemValue in exampleListValue?.Values ?? Enumerable.Empty()) { var elementExpression = GetExpression(elementType, itemValue, serializationFormat, includeCollectionInitialization); elementExpressions.Add(elementExpression); @@ -236,7 +236,7 @@ private static ValueExpression GetExpressionForList(CSharpType listType, InputEx : new ArrayInitializerExpression(elementExpressions.ToArray()); } - private static ValueExpression GetExpressionForDictionary(CSharpType dictionaryType, InputExampleValue exampleValue, SerializationFormat serializationFormat, bool includeCollectionInitialization = true) + private static ValueExpression GetExpressionForDictionary(CSharpType dictionaryType, InputTypeExample exampleValue, SerializationFormat serializationFormat, bool includeCollectionInitialization = true) { var exampleObjectValue = exampleValue as InputExampleObjectValue; // since this is a dictionary, we take the first generic argument as the key type @@ -246,9 +246,9 @@ private static ValueExpression GetExpressionForDictionary(CSharpType dictionaryT var valueType = dictionaryType.Arguments[1]; var elementExpressions = new List<(ValueExpression KeyExpression, ValueExpression ValueExpression)>(); // the collections in our generated SDK could never be assigned to, therefore if we have null value here, we can only assign an empty collection - foreach (var (key, value) in exampleObjectValue?.Values ?? new Dictionary()) + foreach (var (key, value) in exampleObjectValue?.Values ?? new Dictionary()) { - var keyExpression = GetExpression(keyType, InputExampleValue.Value(InputPrimitiveType.String, key), SerializationFormat.Default); + var keyExpression = GetExpression(keyType, InputTypeExample.Value(InputPrimitiveType.String, key), SerializationFormat.Default); var valueExpression = GetExpression(valueType, value, serializationFormat, includeCollectionInitialization); elementExpressions.Add((keyExpression, valueExpression)); } @@ -258,13 +258,13 @@ private static ValueExpression GetExpressionForDictionary(CSharpType dictionaryT : new DictionaryInitializerExpression(elementExpressions.ToArray()); } - private static ValueExpression GetExpressionForBinaryData(InputExampleValue exampleValue) + private static ValueExpression GetExpressionForBinaryData(InputTypeExample exampleValue) { //always use FromObjectAsJson for BinaryData so that the serialization works correctly. return BinaryDataExpression.FromObjectAsJson(GetExpressionForFreeFormObject(exampleValue, true)); } - private static ValueExpression GetExpressionForFreeFormObject(InputExampleValue exampleValue, bool includeCollectionInitialization = true) => exampleValue switch + private static ValueExpression GetExpressionForFreeFormObject(InputTypeExample exampleValue, bool includeCollectionInitialization = true) => exampleValue switch { InputExampleRawValue rawValue => rawValue.RawValue == null ? Null : @@ -280,7 +280,7 @@ private static ValueExpression GetExpressionForBinaryData(InputExampleValue exam private static ValueExpression GetExpressionForAnonymousObject(InputExampleObjectValue exampleObjectValue, bool includeCollectionInitialization = true) { // the collections in our generated SDK could never be assigned to, therefore if we have null value here, we can only assign an empty collection - var keyValues = exampleObjectValue?.Values ?? new Dictionary(); + var keyValues = exampleObjectValue?.Values ?? new Dictionary(); if (keyValues.Any()) { var properties = new Dictionary(); @@ -315,7 +315,7 @@ private static bool CanBeInstantiatedByAnonymousObject(InputExampleObjectValue o return true; } - private static ValueExpression GetExpressionForTypeProvider(CSharpType type, InputExampleValue exampleValue) + private static ValueExpression GetExpressionForTypeProvider(CSharpType type, InputTypeExample exampleValue) { return type.Implementation switch { @@ -325,7 +325,7 @@ private static ValueExpression GetExpressionForTypeProvider(CSharpType type, Inp }; } - private static ObjectType GetActualImplementation(ObjectType objectType, IReadOnlyDictionary valueDict) + private static ObjectType GetActualImplementation(ObjectType objectType, IReadOnlyDictionary valueDict) { var discriminator = objectType.Discriminator; // check if this has a discriminator @@ -346,7 +346,7 @@ private static ObjectType GetActualImplementation(ObjectType objectType, IReadOn return (ObjectType)implementation.Type.Implementation; } - private static ValueExpression GetExpressionForObjectType(ObjectType objectType, IReadOnlyDictionary? valueDict) + private static ValueExpression GetExpressionForObjectType(ObjectType objectType, IReadOnlyDictionary? valueDict) { if (valueDict == null) return Default; @@ -399,9 +399,9 @@ private static ValueExpression GetExpressionForObjectType(ObjectType objectType, return new NewInstanceExpression(objectType.Type, arguments, objectPropertyInitializer); } - private static IReadOnlyDictionary GetPropertiesToWrite(IEnumerable properties, IReadOnlyDictionary valueDict) + private static IReadOnlyDictionary GetPropertiesToWrite(IEnumerable properties, IReadOnlyDictionary valueDict) { - var propertiesToWrite = new Dictionary(); + var propertiesToWrite = new Dictionary(); foreach (var property in properties) { var propertyToDeal = property; @@ -432,7 +432,7 @@ private static IReadOnlyDictionary GetPro return propertiesToWrite; } - private static InputExampleValue? UnwrapExampleValueFromSinglePropertySchema(InputExampleValue exampleValue, FlattenedObjectTypeProperty flattenedProperty) + private static InputTypeExample? UnwrapExampleValueFromSinglePropertySchema(InputTypeExample exampleValue, FlattenedObjectTypeProperty flattenedProperty) { var hierarchyStack = flattenedProperty.BuildHierarchyStack(); // reverse the stack because it is a stack, iterating it will start from the innerest property diff --git a/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs b/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs index 737289a5f8c..b1e745c8b40 100644 --- a/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs +++ b/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs @@ -141,7 +141,7 @@ private void BuildSamples(LowLevelClientMethod method, List if (!shouldGenerateShortVersion && exampleKey != ExampleMockValueBuilder.ShortVersionMockExampleKey) continue; // skip the short example when we decide not to generate it - if (Operation.Examples.TryGetValue(exampleKey, out var operationExample)) + if (Operation.MockExamples.TryGetValue(exampleKey, out var operationExample)) { // add protocol method sample samples.Add(new( diff --git a/src/AutoRest.CSharp/LowLevel/Output/Samples/DpgOperationSample.cs b/src/AutoRest.CSharp/LowLevel/Output/Samples/DpgOperationSample.cs index 0719537880a..3fff9739d99 100644 --- a/src/AutoRest.CSharp/LowLevel/Output/Samples/DpgOperationSample.cs +++ b/src/AutoRest.CSharp/LowLevel/Output/Samples/DpgOperationSample.cs @@ -262,7 +262,7 @@ private bool ProcessKnownParameters(Dictionary parameterExamples, string name) + protected InputTypeExample? FindExampleValueBySerializedName(IEnumerable parameterExamples, string name) { foreach (var parameterExample in parameterExamples) { @@ -298,7 +298,7 @@ private bool ProcessKnownParameters(Dictionary e.Parameter.IsEndpoint)?.ExampleValue; if (clientParameterValue != null) @@ -309,7 +309,7 @@ public InputExampleValue GetEndpointValue(string parameterName) return operationParameterValue; // sometimes, especially in swagger projects, the parameter used as endpoint in our client, does not have the `IsEndpoint` flag, we have to fallback here so that we could at least have a value for it. - return InputExampleValue.Value(InputPrimitiveType.String, $"<{parameterName}>"); + return InputTypeExample.Value(InputPrimitiveType.String, $"<{parameterName}>"); } private bool NeedsDispose(Parameter parameter) @@ -340,11 +340,11 @@ private bool IsInlineParameter(Parameter parameter) return true; } - private InputExampleValue GetBodyParameterValue() + private InputTypeExample GetBodyParameterValue() { // we have a request body type if (_method.RequestBodyType == null) - return InputExampleValue.Null(InputPrimitiveType.Any); + return InputTypeExample.Null(InputPrimitiveType.Any); //if (Method.RequestBodyType is InputPrimitiveType { Kind: InputTypeKind.Stream }) // return InputExampleValue.Stream(Method.RequestBodyType, ""); @@ -364,7 +364,7 @@ private InputExampleValue GetBodyParameterValue() return bodyParameterExample.ExampleValue; } - return InputExampleValue.Null(_method.RequestBodyType); + return InputTypeExample.Null(_method.RequestBodyType); } private static bool IsSameParameter(Parameter parameter, Parameter knownParameter) diff --git a/src/AutoRest.CSharp/LowLevel/Output/Samples/InputExampleParameterValue.cs b/src/AutoRest.CSharp/LowLevel/Output/Samples/InputExampleParameterValue.cs index a39fe8ee71c..0367cdce9bf 100644 --- a/src/AutoRest.CSharp/LowLevel/Output/Samples/InputExampleParameterValue.cs +++ b/src/AutoRest.CSharp/LowLevel/Output/Samples/InputExampleParameterValue.cs @@ -11,7 +11,7 @@ namespace AutoRest.CSharp.Output.Samples.Models { /// - /// A represents a value for a parameter, which could either be a , or a as a literal + /// A represents a value for a parameter, which could either be a , or a as a literal /// internal record InputExampleParameterValue { @@ -19,7 +19,7 @@ internal record InputExampleParameterValue public CSharpType Type { get; } - public InputExampleValue? Value { get; } + public InputTypeExample? Value { get; } public ValueExpression? Expression { get; } @@ -29,7 +29,7 @@ private InputExampleParameterValue(string name, CSharpType type) Type = type; } - public InputExampleParameterValue(Reference reference, InputExampleValue value) : this(reference.Name, reference.Type) + public InputExampleParameterValue(Reference reference, InputTypeExample value) : this(reference.Name, reference.Type) { Value = value; } @@ -39,7 +39,7 @@ public InputExampleParameterValue(Reference reference, ValueExpression expressio Expression = expression; } - public InputExampleParameterValue(Parameter parameter, InputExampleValue value) : this(parameter.Name, parameter.Type) + public InputExampleParameterValue(Parameter parameter, InputTypeExample value) : this(parameter.Name, parameter.Type) { Value = value; } diff --git a/src/AutoRest.CSharp/MgmtTest/Extensions/CodeWriterExtensions.cs b/src/AutoRest.CSharp/MgmtTest/Extensions/CodeWriterExtensions.cs index c23b377c89a..6fe760fbc43 100644 --- a/src/AutoRest.CSharp/MgmtTest/Extensions/CodeWriterExtensions.cs +++ b/src/AutoRest.CSharp/MgmtTest/Extensions/CodeWriterExtensions.cs @@ -34,7 +34,7 @@ internal static class CodeWriterExtensions /// /// /// - public static CodeWriter AppendExampleValue(this CodeWriter writer, InputExampleValue exampleValue, CSharpType? type = null, bool includeCollectionInitialization = true) + public static CodeWriter AppendExampleValue(this CodeWriter writer, InputTypeExample exampleValue, CSharpType? type = null, bool includeCollectionInitialization = true) { // get the type of this schema in the type factory if the type is not specified // get the type from TypeFactory cannot get the replaced types, therefore we need to put an argument in the signature as a hint in case this might happen in the replaced type case @@ -97,7 +97,7 @@ public static CodeWriter AppendExampleParameterValue(this CodeWriter writer, Exa return writer.Append(exampleParameterValue.Expression!); } - private static CodeWriter AppendFrameworkTypeValue(this CodeWriter writer, CSharpType type, InputExampleValue exampleValue, bool includeCollectionInitialization = true) + private static CodeWriter AppendFrameworkTypeValue(this CodeWriter writer, CSharpType type, InputTypeExample exampleValue, bool includeCollectionInitialization = true) { if (type.IsList) return writer.AppendListValue(type, exampleValue as InputExampleListValue, includeCollectionInitialization); @@ -117,7 +117,7 @@ private static CodeWriter AppendFrameworkTypeValue(this CodeWriter writer, CShar return writer.AppendRawValue((exampleValue as InputExampleRawValue)?.RawValue, type.FrameworkType, exampleValue.Type); } - private static CodeWriter AppendDataFactoryElementValue(this CodeWriter writer, CSharpType type, InputExampleValue exampleValue) + private static CodeWriter AppendDataFactoryElementValue(this CodeWriter writer, CSharpType type, InputTypeExample exampleValue) { if (type.FrameworkType != typeof(DataFactoryElement<>)) throw new ArgumentException("DataFactoryElement<> is expected but got: " + type.ToString()); @@ -131,7 +131,7 @@ private static CodeWriter AppendDataFactoryElementValue(this CodeWriter writer, var exampleObjectValue = exampleValue as InputExampleObjectValue; string dfeType = (string)(exampleObjectValue?.Values![DFE_OBJECT_PROPERTY_TYPE] as InputExampleRawValue)?.RawValue!; - InputExampleValue dfeValue = exampleObjectValue?.Values![DFE_OBJECT_PROPERTY_VALUE]!; + InputTypeExample dfeValue = exampleObjectValue?.Values![DFE_OBJECT_PROPERTY_VALUE]!; string createMethodName = dfeType switch { "Expression" => nameof(DataFactoryElement.FromExpression), @@ -155,7 +155,7 @@ private static CodeWriter AppendDataFactoryElementValue(this CodeWriter writer, private static CodeWriter AppendListValue(this CodeWriter writer, CSharpType type, InputExampleListValue? exampleValue, bool includeInitialization = true) { // the collections in our generated SDK could never be assigned to, therefore if we have null value here, we can only assign an empty collection - var elements = exampleValue?.Values ?? Enumerable.Empty(); + var elements = exampleValue?.Values ?? Enumerable.Empty(); // since this is a list, we take the first generic argument (and it should always has this first argument) var elementType = type.Arguments.First(); var initialization = includeInitialization ? (FormattableString)$"new {elementType}[]" : (FormattableString)$""; @@ -179,7 +179,7 @@ private static CodeWriter AppendListValue(this CodeWriter writer, CSharpType typ private static CodeWriter AppendDictionaryValue(this CodeWriter writer, CSharpType type, InputExampleObjectValue? exampleValue, bool includeInitialization = true) { // the collections in our generated SDK could never be assigned to, therefore if we have null value here, we can only assign an empty collection - var keyValues = exampleValue?.Values ?? new Dictionary(); + var keyValues = exampleValue?.Values ?? new Dictionary(); // since this is a dictionary, we take the first generic argument as the key type // this is important because in our SDK, the key of a dictionary is not always a string. It could be a string-like type, for instance, a ResourceIdentifier var keyType = type.Arguments[0]; @@ -220,7 +220,7 @@ private static CodeWriter AppendBinaryData(this CodeWriter writer, InputExampleR } } - private static CodeWriter AppendComplexFrameworkTypeValue(this CodeWriter writer, Type type, InputExampleValue exampleValue) + private static CodeWriter AppendComplexFrameworkTypeValue(this CodeWriter writer, Type type, InputTypeExample exampleValue) { if (exampleValue is not InputExampleObjectValue exampleObjectValue) { @@ -242,7 +242,7 @@ private static CodeWriter AppendComplexFrameworkTypeValue(this CodeWriter writer writer.RemoveTrailingComma(); writer.AppendRaw(")"); // assign values to the optional parameters - var optionalProperties = new Dictionary(); + var optionalProperties = new Dictionary(); foreach ((var propertyName, var metadata) in propertyMetadataDict) { if (metadata.Required) @@ -270,7 +270,7 @@ private static CodeWriter AppendComplexFrameworkTypeValue(this CodeWriter writer return writer; } - private static CodeWriter AppendAnonymousObject(this CodeWriter writer, InputExampleValue exampleValue) + private static CodeWriter AppendAnonymousObject(this CodeWriter writer, InputTypeExample exampleValue) { // check if this is simple type if (exampleValue is InputExampleRawValue exampleRawValue) @@ -384,7 +384,7 @@ _ when _parsableInitializedTypes.Contains(type) => writer.Append($"{type}.Parse( typeof(IPAddress) }; - private static CodeWriter AppendTypeProviderValue(this CodeWriter writer, CSharpType type, InputExampleValue exampleValue) + private static CodeWriter AppendTypeProviderValue(this CodeWriter writer, CSharpType type, InputTypeExample exampleValue) { switch (type.Implementation) { @@ -396,7 +396,7 @@ private static CodeWriter AppendTypeProviderValue(this CodeWriter writer, CSharp return writer.AppendRaw("default"); } - private static ObjectType GetActualImplementation(ObjectType objectType, IReadOnlyDictionary valueDict) + private static ObjectType GetActualImplementation(ObjectType objectType, IReadOnlyDictionary valueDict) { var discriminator = objectType.Discriminator; // check if this has a discriminator @@ -417,7 +417,7 @@ private static ObjectType GetActualImplementation(ObjectType objectType, IReadOn return (ObjectType)implementation.Type.Implementation; } - private static CodeWriter AppendObjectTypeValue(this CodeWriter writer, ObjectType objectType, IReadOnlyDictionary? valueDict) + private static CodeWriter AppendObjectTypeValue(this CodeWriter writer, ObjectType objectType, IReadOnlyDictionary? valueDict) { if (valueDict == null) { @@ -438,7 +438,7 @@ private static CodeWriter AppendObjectTypeValue(this CodeWriter writer, ObjectTy { // try every property, convert them to variable name and see if there are some of them matching var property = propertyDict[parameter.Name]; - InputExampleValue? exampleValue; + InputTypeExample? exampleValue; if (!valueDict.TryGetValue(property.InputModelProperty!.SerializedName, out exampleValue)) { // we could only stand the case that the missing property here is a collection, in this case, we pass an empty collection @@ -476,9 +476,9 @@ private static CodeWriter AppendObjectTypeValue(this CodeWriter writer, ObjectTy return writer; } - private static Dictionary GetPropertiesToWrite(IEnumerable properties, IReadOnlyDictionary valueDict) + private static Dictionary GetPropertiesToWrite(IEnumerable properties, IReadOnlyDictionary valueDict) { - var propertiesToWrite = new Dictionary(); + var propertiesToWrite = new Dictionary(); foreach (var property in properties) { var propertyToDeal = property; @@ -509,7 +509,7 @@ private static CodeWriter AppendObjectTypeValue(this CodeWriter writer, ObjectTy return propertiesToWrite; } - private static InputExampleValue? UnwrapExampleValueFromSinglePropertySchema(InputExampleValue exampleValue, FlattenedObjectTypeProperty flattenedProperty) + private static InputTypeExample? UnwrapExampleValueFromSinglePropertySchema(InputTypeExample exampleValue, FlattenedObjectTypeProperty flattenedProperty) { var hierarchyStack = flattenedProperty.BuildHierarchyStack(); // reverse the stack because it is a stack, iterating it will start from the innerest property diff --git a/src/AutoRest.CSharp/MgmtTest/Models/ExampleParameterValue.cs b/src/AutoRest.CSharp/MgmtTest/Models/ExampleParameterValue.cs index d90e8fd781d..f2376c488e3 100644 --- a/src/AutoRest.CSharp/MgmtTest/Models/ExampleParameterValue.cs +++ b/src/AutoRest.CSharp/MgmtTest/Models/ExampleParameterValue.cs @@ -22,7 +22,7 @@ internal record ExampleParameterValue public CSharpType Type { get; } - public InputExampleValue? Value { get; } + public InputTypeExample? Value { get; } public FormattableString? Expression { get; } @@ -32,7 +32,7 @@ private ExampleParameterValue(string name, CSharpType type) Type = type; } - public ExampleParameterValue(Reference reference, InputExampleValue value) : this(reference.Name, reference.Type) + public ExampleParameterValue(Reference reference, InputTypeExample value) : this(reference.Name, reference.Type) { Value = value; } @@ -42,7 +42,7 @@ public ExampleParameterValue(Reference reference, FormattableString rawValue) : Expression = rawValue; } - public ExampleParameterValue(Parameter parameter, InputExampleValue value) : this(parameter.Name, parameter.Type) + public ExampleParameterValue(Parameter parameter, InputTypeExample value) : this(parameter.Name, parameter.Type) { Value = value; } diff --git a/src/AutoRest.CSharp/MgmtTest/Models/MockTestCase.cs b/src/AutoRest.CSharp/MgmtTest/Models/MockTestCase.cs index d81854cec2b..56f26165695 100644 --- a/src/AutoRest.CSharp/MgmtTest/Models/MockTestCase.cs +++ b/src/AutoRest.CSharp/MgmtTest/Models/MockTestCase.cs @@ -91,7 +91,7 @@ private Tuple EnsureParameterValueMapping() // if this parameter is a body parameter, we might have changed it to required, and we cannot tell if we have changed it on the codemodel right now. In this case we just fake an empty body. if (parameter.DefaultValue == null && parameter.RequestLocation == RequestLocation.Body) { - exampleParameter ??= new(new InputParameter(), new InputExampleObjectValue(InputPrimitiveType.Boolean, new Dictionary())); + exampleParameter ??= new(new InputParameter(), new InputExampleObjectValue(InputPrimitiveType.Boolean, new Dictionary())); } if (exampleParameter == null) { @@ -152,7 +152,7 @@ private static bool ProcessKnownParameters(MappingObject result, Parameter param public bool IsPageable => Operation.IsPagingOperation; - protected override InputExampleValue ReplacePathParameterValue(string serializedName, CSharpType type, InputExampleValue value) + protected override InputTypeExample ReplacePathParameterValue(string serializedName, CSharpType type, InputTypeExample value) { if (serializedName == "subscriptionId") { diff --git a/src/AutoRest.CSharp/MgmtTest/Models/OperationExample.cs b/src/AutoRest.CSharp/MgmtTest/Models/OperationExample.cs index 55df3e53fb2..4b27fa00cf2 100644 --- a/src/AutoRest.CSharp/MgmtTest/Models/OperationExample.cs +++ b/src/AutoRest.CSharp/MgmtTest/Models/OperationExample.cs @@ -130,7 +130,7 @@ private ExampleParameterValue FindExampleParameterValueFromReference(Reference r return new ExampleParameterValue(reference, exampleValue); } - protected virtual InputExampleValue ReplacePathParameterValue(string serializedName, CSharpType type, InputExampleValue value) + protected virtual InputTypeExample ReplacePathParameterValue(string serializedName, CSharpType type, InputTypeExample value) => value; private Dictionary EnsureParameterSerializedNames() diff --git a/src/AutoRest.CSharp/MgmtTest/Models/Sample.cs b/src/AutoRest.CSharp/MgmtTest/Models/Sample.cs index 3b90c55f1d5..ff99090b338 100644 --- a/src/AutoRest.CSharp/MgmtTest/Models/Sample.cs +++ b/src/AutoRest.CSharp/MgmtTest/Models/Sample.cs @@ -15,7 +15,7 @@ public Sample(MockTestCase testCase) : base(testCase.OperationId, testCase.Carri protected override string GetMethodName(bool hasSuffix) => base.GetMethodName(true); // sample will always use a full name - protected override InputExampleValue ReplacePathParameterValue(string serializedName, CSharpType type, InputExampleValue value) + protected override InputTypeExample ReplacePathParameterValue(string serializedName, CSharpType type, InputTypeExample value) { // the samples do not override anything return value; diff --git a/test/TestProjects/FirstTest-TypeSpec/tspCodeModel.json b/test/TestProjects/FirstTest-TypeSpec/tspCodeModel.json index b41cdcf2196..3b8c5205e1f 100644 --- a/test/TestProjects/FirstTest-TypeSpec/tspCodeModel.json +++ b/test/TestProjects/FirstTest-TypeSpec/tspCodeModel.json @@ -2221,10 +2221,69 @@ "BufferResponse": true, "GenerateProtocolMethod": true, "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "FirstTestTypeSpec.topAction" + "CrossLanguageDefinitionId": "FirstTestTypeSpec.topAction", + "Examples": [ + { + "$id": "301", + "kind": "http", + "name": "For test topAction", + "description": "For test topAction", + "filePath": "C:/Users/dapzhang/Documents/workspace/autorest.csharp/test/TestProjects/FirstTest-TypeSpec/examples/2022-05-15-preview/FirstTestTypeSpec_TopAction.json", + "rawExample": { + "$id": "302", + "operationId": "TopAction", + "title": "For test topAction", + "parameters": { + "$id": "303", + "action": "2024-05-06T12:20-12Z" + }, + "responses": { + "200": { + "$id": "305", + "body": { + "$id": "306", + "name": "test", + "requiredUnion": [ + "a", + "b", + "c" + ] + } + }, + "$id": "304" + } + }, + "parameters": [ + { + "$id": "307", + "parameter": { + "$ref": "294" + }, + "value": { + "$id": "308", + "kind": "string", + "type": { + "$id": "309", + "Kind": "utcDateTime", + "Name": "utcDateTime", + "Encode": "rfc3339", + "WireType": { + "$id": "310", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string" + }, + "CrossLanguageDefinitionId": "TypeSpec.utcDateTime" + }, + "value": "2024-05-06T12:20-12Z" + } + } + ] + } + ] }, { - "$id": "301", + "$id": "311", "Name": "topAction2", "ResourceName": "FirstTestTypeSpec", "Description": "top level method2", @@ -2234,14 +2293,14 @@ "$ref": "292" }, { - "$id": "302", + "$id": "312", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "303", + "$id": "313", "Kind": "constant", "ValueType": { - "$id": "304", + "$id": "314", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -2259,7 +2318,7 @@ ], "Responses": [ { - "$id": "305", + "$id": "315", "StatusCodes": [ 200 ], @@ -2284,7 +2343,7 @@ "CrossLanguageDefinitionId": "FirstTestTypeSpec.topAction2" }, { - "$id": "306", + "$id": "316", "Name": "patchAction", "ResourceName": "FirstTestTypeSpec", "Description": "top level patch", @@ -2294,15 +2353,15 @@ "$ref": "292" }, { - "$id": "307", + "$id": "317", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "308", + "$id": "318", "Kind": "constant", "ValueType": { - "$id": "309", + "$id": "319", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -2318,14 +2377,14 @@ "Kind": "Constant" }, { - "$id": "310", + "$id": "320", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "311", + "$id": "321", "Kind": "constant", "ValueType": { - "$id": "312", + "$id": "322", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -2341,7 +2400,7 @@ "Kind": "Constant" }, { - "$id": "313", + "$id": "323", "Name": "body", "NameInRequest": "body", "Type": { @@ -2358,7 +2417,7 @@ ], "Responses": [ { - "$id": "314", + "$id": "324", "StatusCodes": [ 200 ], @@ -2386,7 +2445,7 @@ "CrossLanguageDefinitionId": "FirstTestTypeSpec.patchAction" }, { - "$id": "315", + "$id": "325", "Name": "anonymousBody", "ResourceName": "FirstTestTypeSpec", "Description": "body parameter without body decorator", @@ -2396,15 +2455,15 @@ "$ref": "292" }, { - "$id": "316", + "$id": "326", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "317", + "$id": "327", "Kind": "constant", "ValueType": { - "$id": "318", + "$id": "328", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -2420,14 +2479,14 @@ "Kind": "Constant" }, { - "$id": "319", + "$id": "329", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "320", + "$id": "330", "Kind": "constant", "ValueType": { - "$id": "321", + "$id": "331", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -2443,7 +2502,7 @@ "Kind": "Constant" }, { - "$id": "322", + "$id": "332", "Name": "anonymousBodyRequest", "NameInRequest": "anonymousBodyRequest", "Type": { @@ -2460,7 +2519,7 @@ ], "Responses": [ { - "$id": "323", + "$id": "333", "StatusCodes": [ 200 ], @@ -2488,7 +2547,7 @@ "CrossLanguageDefinitionId": "FirstTestTypeSpec.anonymousBody" }, { - "$id": "324", + "$id": "334", "Name": "friendlyModel", "ResourceName": "FirstTestTypeSpec", "Description": "Model can have its friendly name", @@ -2498,15 +2557,15 @@ "$ref": "292" }, { - "$id": "325", + "$id": "335", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "326", + "$id": "336", "Kind": "constant", "ValueType": { - "$id": "327", + "$id": "337", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -2522,14 +2581,14 @@ "Kind": "Constant" }, { - "$id": "328", + "$id": "338", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "329", + "$id": "339", "Kind": "constant", "ValueType": { - "$id": "330", + "$id": "340", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -2545,7 +2604,7 @@ "Kind": "Constant" }, { - "$id": "331", + "$id": "341", "Name": "friendlyModelRequest", "NameInRequest": "friendlyModelRequest", "Type": { @@ -2562,7 +2621,7 @@ ], "Responses": [ { - "$id": "332", + "$id": "342", "StatusCodes": [ 200 ], @@ -2590,7 +2649,7 @@ "CrossLanguageDefinitionId": "FirstTestTypeSpec.friendlyModel" }, { - "$id": "333", + "$id": "343", "Name": "addTimeHeader", "ResourceName": "FirstTestTypeSpec", "Accessibility": "public", @@ -2599,16 +2658,16 @@ "$ref": "292" }, { - "$id": "334", + "$id": "344", "Name": "repeatabilityFirstSent", "NameInRequest": "Repeatability-First-Sent", "Type": { - "$id": "335", + "$id": "345", "Kind": "utcDateTime", "Name": "utcDateTime", "Encode": "rfc7231", "WireType": { - "$id": "336", + "$id": "346", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -2626,7 +2685,7 @@ ], "Responses": [ { - "$id": "337", + "$id": "347", "StatusCodes": [ 204 ], @@ -2645,7 +2704,7 @@ "CrossLanguageDefinitionId": "FirstTestTypeSpec.addTimeHeader" }, { - "$id": "338", + "$id": "348", "Name": "stringFormat", "ResourceName": "FirstTestTypeSpec", "Description": "paramete has string format.", @@ -2655,16 +2714,16 @@ "$ref": "292" }, { - "$id": "339", + "$id": "349", "Name": "subscriptionId", "NameInRequest": "subscriptionId", "Type": { - "$id": "340", + "$id": "350", "Kind": "string", "Name": "uuid", "CrossLanguageDefinitionId": "Azure.Core.uuid", "BaseType": { - "$id": "341", + "$id": "351", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -2679,15 +2738,15 @@ "Kind": "Method" }, { - "$id": "342", + "$id": "352", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "343", + "$id": "353", "Kind": "constant", "ValueType": { - "$id": "344", + "$id": "354", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -2703,7 +2762,7 @@ "Kind": "Constant" }, { - "$id": "345", + "$id": "355", "Name": "body", "NameInRequest": "body", "Type": { @@ -2720,7 +2779,7 @@ ], "Responses": [ { - "$id": "346", + "$id": "356", "StatusCodes": [ 204 ], @@ -2742,7 +2801,7 @@ "CrossLanguageDefinitionId": "FirstTestTypeSpec.stringFormat" }, { - "$id": "347", + "$id": "357", "Name": "projectedNameModel", "ResourceName": "FirstTestTypeSpec", "Description": "Model can have its projected name", @@ -2752,15 +2811,15 @@ "$ref": "292" }, { - "$id": "348", + "$id": "358", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "349", + "$id": "359", "Kind": "constant", "ValueType": { - "$id": "350", + "$id": "360", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -2776,14 +2835,14 @@ "Kind": "Constant" }, { - "$id": "351", + "$id": "361", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "352", + "$id": "362", "Kind": "constant", "ValueType": { - "$id": "353", + "$id": "363", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -2799,7 +2858,7 @@ "Kind": "Constant" }, { - "$id": "354", + "$id": "364", "Name": "projectedNameModelRequest", "NameInRequest": "projectedNameModelRequest", "Type": { @@ -2816,7 +2875,7 @@ ], "Responses": [ { - "$id": "355", + "$id": "365", "StatusCodes": [ 200 ], @@ -2844,7 +2903,7 @@ "CrossLanguageDefinitionId": "FirstTestTypeSpec.projectedNameModel" }, { - "$id": "356", + "$id": "366", "Name": "returnsAnonymousModel", "ResourceName": "FirstTestTypeSpec", "Description": "return anonymous model", @@ -2854,14 +2913,14 @@ "$ref": "292" }, { - "$id": "357", + "$id": "367", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "358", + "$id": "368", "Kind": "constant", "ValueType": { - "$id": "359", + "$id": "369", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -2879,7 +2938,7 @@ ], "Responses": [ { - "$id": "360", + "$id": "370", "StatusCodes": [ 200 ], @@ -2904,7 +2963,7 @@ "CrossLanguageDefinitionId": "FirstTestTypeSpec.returnsAnonymousModel" }, { - "$id": "361", + "$id": "371", "Name": "headAsBoolean", "ResourceName": "FirstTestTypeSpec", "Description": "head as boolean.", @@ -2914,11 +2973,11 @@ "$ref": "292" }, { - "$id": "362", + "$id": "372", "Name": "id", "NameInRequest": "id", "Type": { - "$id": "363", + "$id": "373", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -2934,7 +2993,7 @@ ], "Responses": [ { - "$id": "364", + "$id": "374", "StatusCodes": [ 204 ], @@ -2953,7 +3012,7 @@ "CrossLanguageDefinitionId": "FirstTestTypeSpec.headAsBoolean" }, { - "$id": "365", + "$id": "375", "Name": "stringBody", "ResourceName": "FirstTestTypeSpec", "Description": "The body parameter type is string.", @@ -2963,15 +3022,15 @@ "$ref": "292" }, { - "$id": "366", + "$id": "376", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "367", + "$id": "377", "Kind": "constant", "ValueType": { - "$id": "368", + "$id": "378", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -2987,11 +3046,11 @@ "Kind": "Constant" }, { - "$id": "369", + "$id": "379", "Name": "body", "NameInRequest": "body", "Type": { - "$id": "370", + "$id": "380", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -3007,7 +3066,7 @@ ], "Responses": [ { - "$id": "371", + "$id": "381", "StatusCodes": [ 204 ], @@ -3029,7 +3088,7 @@ "CrossLanguageDefinitionId": "FirstTestTypeSpec.stringBody" }, { - "$id": "372", + "$id": "382", "Name": "boolBody", "ResourceName": "FirstTestTypeSpec", "Description": "The body parameter type is bool.", @@ -3039,15 +3098,15 @@ "$ref": "292" }, { - "$id": "373", + "$id": "383", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "374", + "$id": "384", "Kind": "constant", "ValueType": { - "$id": "375", + "$id": "385", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -3063,11 +3122,11 @@ "Kind": "Constant" }, { - "$id": "376", + "$id": "386", "Name": "body", "NameInRequest": "body", "Type": { - "$id": "377", + "$id": "387", "Kind": "boolean", "Name": "boolean", "CrossLanguageDefinitionId": "TypeSpec.boolean" @@ -3083,7 +3142,7 @@ ], "Responses": [ { - "$id": "378", + "$id": "388", "StatusCodes": [ 204 ], @@ -3105,7 +3164,7 @@ "CrossLanguageDefinitionId": "FirstTestTypeSpec.boolBody" }, { - "$id": "379", + "$id": "389", "Name": "dateTimeBody", "ResourceName": "FirstTestTypeSpec", "Description": "The body parameter type is datetime.", @@ -3115,15 +3174,15 @@ "$ref": "292" }, { - "$id": "380", + "$id": "390", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "381", + "$id": "391", "Kind": "constant", "ValueType": { - "$id": "382", + "$id": "392", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -3139,16 +3198,16 @@ "Kind": "Constant" }, { - "$id": "383", + "$id": "393", "Name": "body", "NameInRequest": "body", "Type": { - "$id": "384", + "$id": "394", "Kind": "utcDateTime", "Name": "utcDateTime", "Encode": "rfc3339", "WireType": { - "$id": "385", + "$id": "395", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -3166,7 +3225,7 @@ ], "Responses": [ { - "$id": "386", + "$id": "396", "StatusCodes": [ 204 ], @@ -3188,7 +3247,7 @@ "CrossLanguageDefinitionId": "FirstTestTypeSpec.dateTimeBody" }, { - "$id": "387", + "$id": "397", "Name": "returnString", "ResourceName": "FirstTestTypeSpec", "Description": "The return type is datetime.", @@ -3198,14 +3257,14 @@ "$ref": "292" }, { - "$id": "388", + "$id": "398", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "389", + "$id": "399", "Kind": "constant", "ValueType": { - "$id": "390", + "$id": "400", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -3223,12 +3282,12 @@ ], "Responses": [ { - "$id": "391", + "$id": "401", "StatusCodes": [ 200 ], "BodyType": { - "$id": "392", + "$id": "402", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -3251,7 +3310,7 @@ "CrossLanguageDefinitionId": "FirstTestTypeSpec.returnString" }, { - "$id": "393", + "$id": "403", "Name": "returnUnknown", "ResourceName": "FirstTestTypeSpec", "Accessibility": "public", @@ -3260,14 +3319,14 @@ "$ref": "292" }, { - "$id": "394", + "$id": "404", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "395", + "$id": "405", "Kind": "constant", "ValueType": { - "$id": "396", + "$id": "406", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -3285,12 +3344,12 @@ ], "Responses": [ { - "$id": "397", + "$id": "407", "StatusCodes": [ 200 ], "BodyType": { - "$id": "398", + "$id": "408", "Kind": "any", "Name": "unknown", "CrossLanguageDefinitionId": "" @@ -3313,7 +3372,7 @@ "CrossLanguageDefinitionId": "FirstTestTypeSpec.returnUnknown" }, { - "$id": "399", + "$id": "409", "Name": "recursiveExtension", "ResourceName": "FirstTestTypeSpec", "Description": "test parent reference child", @@ -3323,15 +3382,15 @@ "$ref": "292" }, { - "$id": "400", + "$id": "410", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "401", + "$id": "411", "Kind": "constant", "ValueType": { - "$id": "402", + "$id": "412", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -3347,7 +3406,7 @@ "Kind": "Constant" }, { - "$id": "403", + "$id": "413", "Name": "input", "NameInRequest": "input", "Type": { @@ -3364,7 +3423,7 @@ ], "Responses": [ { - "$id": "404", + "$id": "414", "StatusCodes": [ 204 ], @@ -3386,7 +3445,7 @@ "CrossLanguageDefinitionId": "FirstTestTypeSpec.recursiveExtension" }, { - "$id": "405", + "$id": "415", "Name": "threeLevelRecursive", "ResourceName": "FirstTestTypeSpec", "Description": "test three level recursive extension", @@ -3396,15 +3455,15 @@ "$ref": "292" }, { - "$id": "406", + "$id": "416", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "407", + "$id": "417", "Kind": "constant", "ValueType": { - "$id": "408", + "$id": "418", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -3420,7 +3479,7 @@ "Kind": "Constant" }, { - "$id": "409", + "$id": "419", "Name": "input", "NameInRequest": "input", "Type": { @@ -3437,7 +3496,7 @@ ], "Responses": [ { - "$id": "410", + "$id": "420", "StatusCodes": [ 204 ], @@ -3459,7 +3518,7 @@ "CrossLanguageDefinitionId": "FirstTestTypeSpec.threeLevelRecursive" }, { - "$id": "411", + "$id": "421", "Name": "recursiveModels", "ResourceName": "FirstTestTypeSpec", "Description": "test child reference parent", @@ -3469,15 +3528,15 @@ "$ref": "292" }, { - "$id": "412", + "$id": "422", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "413", + "$id": "423", "Kind": "constant", "ValueType": { - "$id": "414", + "$id": "424", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -3493,7 +3552,7 @@ "Kind": "Constant" }, { - "$id": "415", + "$id": "425", "Name": "input", "NameInRequest": "input", "Type": { @@ -3510,7 +3569,7 @@ ], "Responses": [ { - "$id": "416", + "$id": "426", "StatusCodes": [ 204 ], @@ -3532,7 +3591,7 @@ "CrossLanguageDefinitionId": "FirstTestTypeSpec.recursiveModels" }, { - "$id": "417", + "$id": "427", "Name": "ContainSelfModels", "ResourceName": "FirstTestTypeSpec", "Description": "test contain self models", @@ -3542,15 +3601,15 @@ "$ref": "292" }, { - "$id": "418", + "$id": "428", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "419", + "$id": "429", "Kind": "constant", "ValueType": { - "$id": "420", + "$id": "430", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -3566,7 +3625,7 @@ "Kind": "Constant" }, { - "$id": "421", + "$id": "431", "Name": "input", "NameInRequest": "input", "Type": { @@ -3583,7 +3642,7 @@ ], "Responses": [ { - "$id": "422", + "$id": "432", "StatusCodes": [ 204 ], @@ -3605,7 +3664,7 @@ "CrossLanguageDefinitionId": "FirstTestTypeSpec.ContainSelfModels" }, { - "$id": "423", + "$id": "433", "Name": "enumParameter", "ResourceName": "FirstTestTypeSpec", "Description": "test enum parameter.", @@ -3615,7 +3674,7 @@ "$ref": "292" }, { - "$id": "424", + "$id": "434", "Name": "p1", "NameInRequest": "p1", "Type": { @@ -3632,7 +3691,7 @@ ], "Responses": [ { - "$id": "425", + "$id": "435", "StatusCodes": [ 204 ], @@ -3651,7 +3710,7 @@ "CrossLanguageDefinitionId": "FirstTestTypeSpec.enumParameter" }, { - "$id": "426", + "$id": "436", "Name": "bodyIsModelWithProjectedEnum", "ResourceName": "FirstTestTypeSpec", "Description": "test enum parameter.", @@ -3661,15 +3720,15 @@ "$ref": "292" }, { - "$id": "427", + "$id": "437", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "428", + "$id": "438", "Kind": "constant", "ValueType": { - "$id": "429", + "$id": "439", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -3685,7 +3744,7 @@ "Kind": "Constant" }, { - "$id": "430", + "$id": "440", "Name": "body", "NameInRequest": "body", "Type": { @@ -3702,7 +3761,7 @@ ], "Responses": [ { - "$id": "431", + "$id": "441", "StatusCodes": [ 204 ], @@ -3724,7 +3783,7 @@ "CrossLanguageDefinitionId": "FirstTestTypeSpec.bodyIsModelWithProjectedEnum" }, { - "$id": "432", + "$id": "442", "Name": "optionalDictionary", "ResourceName": "FirstTestTypeSpec", "Description": "test optional dictionary.", @@ -3734,15 +3793,15 @@ "$ref": "292" }, { - "$id": "433", + "$id": "443", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "434", + "$id": "444", "Kind": "constant", "ValueType": { - "$id": "435", + "$id": "445", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -3758,20 +3817,20 @@ "Kind": "Constant" }, { - "$id": "436", + "$id": "446", "Name": "body", "NameInRequest": "body", "Type": { - "$id": "437", + "$id": "447", "Kind": "dict", "KeyType": { - "$id": "438", + "$id": "448", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" }, "ValueType": { - "$id": "439", + "$id": "449", "Kind": "int32", "Name": "int32", "CrossLanguageDefinitionId": "TypeSpec.int32" @@ -3788,7 +3847,7 @@ ], "Responses": [ { - "$id": "440", + "$id": "450", "StatusCodes": [ 204 ], @@ -3810,7 +3869,7 @@ "CrossLanguageDefinitionId": "FirstTestTypeSpec.optionalDictionary" }, { - "$id": "441", + "$id": "451", "Name": "azureLocationOp", "ResourceName": "FirstTestTypeSpec", "Description": "test optional dictionary.", @@ -3820,16 +3879,16 @@ "$ref": "292" }, { - "$id": "442", + "$id": "452", "Name": "location", "NameInRequest": "location", "Type": { - "$id": "443", + "$id": "453", "Kind": "string", "Name": "azureLocation", "CrossLanguageDefinitionId": "Azure.Core.azureLocation", "BaseType": { - "$id": "444", + "$id": "454", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -3844,16 +3903,16 @@ "Kind": "Method" }, { - "$id": "445", + "$id": "455", "Name": "regenLocation", "NameInRequest": "regen-location", "Type": { - "$id": "446", + "$id": "456", "Kind": "string", "Name": "azureLocation", "CrossLanguageDefinitionId": "Azure.Core.azureLocation", "BaseType": { - "$id": "447", + "$id": "457", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -3868,15 +3927,15 @@ "Kind": "Method" }, { - "$id": "448", + "$id": "458", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "449", + "$id": "459", "Kind": "constant", "ValueType": { - "$id": "450", + "$id": "460", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -3892,7 +3951,7 @@ "Kind": "Constant" }, { - "$id": "451", + "$id": "461", "Name": "body", "NameInRequest": "body", "Type": { @@ -3909,7 +3968,7 @@ ], "Responses": [ { - "$id": "452", + "$id": "462", "StatusCodes": [ 204 ], @@ -3932,7 +3991,7 @@ } ], "Protocol": { - "$id": "453" + "$id": "463" }, "Parameters": [ { @@ -3941,20 +4000,20 @@ ] }, { - "$id": "454", + "$id": "464", "Name": "Hello", "Operations": [], "Protocol": { - "$id": "455" + "$id": "465" }, "Parent": "FirstTestTypeSpecClient", "Parameters": [ { - "$id": "456", + "$id": "466", "Name": "firstTestTypeSpecUrl", "NameInRequest": "firstTestTypeSpecUrl", "Type": { - "$id": "457", + "$id": "467", "Kind": "url", "Name": "url", "CrossLanguageDefinitionId": "TypeSpec.url" @@ -3972,23 +4031,23 @@ ] }, { - "$id": "458", + "$id": "468", "Name": "HelloDemo", "Description": "Hello world service", "Operations": [ { - "$id": "459", + "$id": "469", "Name": "sayHi", "ResourceName": "Demo", "Description": "Return hi", "Accessibility": "public", "Parameters": [ { - "$id": "460", + "$id": "470", "Name": "firstTestTypeSpecUrl", "NameInRequest": "firstTestTypeSpecUrl", "Type": { - "$id": "461", + "$id": "471", "Kind": "url", "Name": "url", "CrossLanguageDefinitionId": "TypeSpec.url" @@ -4004,11 +4063,11 @@ "Kind": "Client" }, { - "$id": "462", + "$id": "472", "Name": "headParameter", "NameInRequest": "head-parameter", "Type": { - "$id": "463", + "$id": "473", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -4022,11 +4081,11 @@ "Kind": "Method" }, { - "$id": "464", + "$id": "474", "Name": "queryParameter", "NameInRequest": "queryParameter", "Type": { - "$id": "465", + "$id": "475", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -4040,11 +4099,11 @@ "Kind": "Method" }, { - "$id": "466", + "$id": "476", "Name": "optionalQuery", "NameInRequest": "optionalQuery", "Type": { - "$id": "467", + "$id": "477", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -4058,14 +4117,14 @@ "Kind": "Method" }, { - "$id": "468", + "$id": "478", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "469", + "$id": "479", "Kind": "constant", "ValueType": { - "$id": "470", + "$id": "480", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -4083,7 +4142,7 @@ ], "Responses": [ { - "$id": "471", + "$id": "481", "StatusCodes": [ 200 ], @@ -4109,32 +4168,32 @@ } ], "Protocol": { - "$id": "472" + "$id": "482" }, "Parent": "Hello", "Parameters": [ { - "$ref": "460" + "$ref": "470" } ] }, { - "$id": "473", + "$id": "483", "Name": "HelloDemo2", "Operations": [ { - "$id": "474", + "$id": "484", "Name": "helloAgain", "ResourceName": "Demo2", "Description": "Return hi again", "Accessibility": "public", "Parameters": [ { - "$id": "475", + "$id": "485", "Name": "firstTestTypeSpecUrl", "NameInRequest": "firstTestTypeSpecUrl", "Type": { - "$id": "476", + "$id": "486", "Kind": "url", "Name": "url", "CrossLanguageDefinitionId": "TypeSpec.url" @@ -4150,11 +4209,11 @@ "Kind": "Client" }, { - "$id": "477", + "$id": "487", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "478", + "$id": "488", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -4168,14 +4227,14 @@ "Kind": "Method" }, { - "$id": "479", + "$id": "489", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "480", + "$id": "490", "Kind": "constant", "ValueType": { - "$id": "481", + "$id": "491", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -4191,11 +4250,11 @@ "Kind": "Constant" }, { - "$id": "482", + "$id": "492", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "483", + "$id": "493", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -4209,14 +4268,14 @@ "Kind": "Method" }, { - "$id": "484", + "$id": "494", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "485", + "$id": "495", "Kind": "constant", "ValueType": { - "$id": "486", + "$id": "496", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -4232,7 +4291,7 @@ "Kind": "Constant" }, { - "$id": "487", + "$id": "497", "Name": "action", "NameInRequest": "action", "Type": { @@ -4249,7 +4308,7 @@ ], "Responses": [ { - "$id": "488", + "$id": "498", "StatusCodes": [ 200 ], @@ -4277,21 +4336,21 @@ "CrossLanguageDefinitionId": "FirstTestTypeSpec.Hello.Demo2.helloAgain" }, { - "$id": "489", + "$id": "499", "Name": "noContentType", "ResourceName": "Demo2", "Description": "Return hi again", "Accessibility": "public", "Parameters": [ { - "$ref": "475" + "$ref": "485" }, { - "$id": "490", + "$id": "500", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "491", + "$id": "501", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -4305,11 +4364,11 @@ "Kind": "Method" }, { - "$id": "492", + "$id": "502", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "493", + "$id": "503", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -4323,15 +4382,15 @@ "Kind": "Method" }, { - "$id": "494", + "$id": "504", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "495", + "$id": "505", "Kind": "constant", "ValueType": { - "$id": "496", + "$id": "506", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -4347,14 +4406,14 @@ "Kind": "Constant" }, { - "$id": "497", + "$id": "507", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "498", + "$id": "508", "Kind": "constant", "ValueType": { - "$id": "499", + "$id": "509", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -4370,7 +4429,7 @@ "Kind": "Constant" }, { - "$id": "500", + "$id": "510", "Name": "action", "NameInRequest": "action", "Type": { @@ -4387,7 +4446,7 @@ ], "Responses": [ { - "$id": "501", + "$id": "511", "StatusCodes": [ 200 ], @@ -4415,24 +4474,24 @@ "CrossLanguageDefinitionId": "FirstTestTypeSpec.Hello.Demo2.noContentType" }, { - "$id": "502", + "$id": "512", "Name": "helloDemoAgain", "ResourceName": "Demo2", "Description": "Return hi in demo2", "Accessibility": "public", "Parameters": [ { - "$ref": "475" + "$ref": "485" }, { - "$id": "503", + "$id": "513", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "504", + "$id": "514", "Kind": "constant", "ValueType": { - "$id": "505", + "$id": "515", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -4450,7 +4509,7 @@ ], "Responses": [ { - "$id": "506", + "$id": "516", "StatusCodes": [ 200 ], @@ -4475,25 +4534,25 @@ "CrossLanguageDefinitionId": "FirstTestTypeSpec.Hello.Demo2.helloDemoAgain" }, { - "$id": "507", + "$id": "517", "Name": "createLiteral", "ResourceName": "Demo2", "Description": "Create with literal value", "Accessibility": "public", "Parameters": [ { - "$ref": "475" + "$ref": "485" }, { - "$id": "508", + "$id": "518", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "509", + "$id": "519", "Kind": "constant", "ValueType": { - "$id": "510", + "$id": "520", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -4509,14 +4568,14 @@ "Kind": "Constant" }, { - "$id": "511", + "$id": "521", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "512", + "$id": "522", "Kind": "constant", "ValueType": { - "$id": "513", + "$id": "523", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -4532,7 +4591,7 @@ "Kind": "Constant" }, { - "$id": "514", + "$id": "524", "Name": "body", "NameInRequest": "body", "Type": { @@ -4549,7 +4608,7 @@ ], "Responses": [ { - "$id": "515", + "$id": "525", "StatusCodes": [ 200 ], @@ -4577,24 +4636,24 @@ "CrossLanguageDefinitionId": "FirstTestTypeSpec.Hello.Demo2.createLiteral" }, { - "$id": "516", + "$id": "526", "Name": "helloLiteral", "ResourceName": "Demo2", "Description": "Send literal parameters", "Accessibility": "public", "Parameters": [ { - "$ref": "475" + "$ref": "485" }, { - "$id": "517", + "$id": "527", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "518", + "$id": "528", "Kind": "constant", "ValueType": { - "$id": "519", + "$id": "529", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -4610,14 +4669,14 @@ "Kind": "Constant" }, { - "$id": "520", + "$id": "530", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "521", + "$id": "531", "Kind": "constant", "ValueType": { - "$id": "522", + "$id": "532", "Kind": "int32", "Name": "int32", "CrossLanguageDefinitionId": "TypeSpec.int32" @@ -4633,14 +4692,14 @@ "Kind": "Constant" }, { - "$id": "523", + "$id": "533", "Name": "p3", "NameInRequest": "p3", "Type": { - "$id": "524", + "$id": "534", "Kind": "constant", "ValueType": { - "$id": "525", + "$id": "535", "Kind": "boolean", "Name": "boolean", "CrossLanguageDefinitionId": "TypeSpec.boolean" @@ -4656,14 +4715,14 @@ "Kind": "Constant" }, { - "$id": "526", + "$id": "536", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "527", + "$id": "537", "Kind": "constant", "ValueType": { - "$id": "528", + "$id": "538", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -4681,7 +4740,7 @@ ], "Responses": [ { - "$id": "529", + "$id": "539", "StatusCodes": [ 200 ], @@ -4707,32 +4766,32 @@ } ], "Protocol": { - "$id": "530" + "$id": "540" }, "Parent": "Hello", "Parameters": [ { - "$ref": "475" + "$ref": "485" } ] }, { - "$id": "531", + "$id": "541", "Name": "EnumTest", "Operations": [ { - "$id": "532", + "$id": "542", "Name": "createUnknownValue", "ResourceName": "EnumTest", "Description": "get extensible enum", "Accessibility": "public", "Parameters": [ { - "$id": "533", + "$id": "543", "Name": "firstTestTypeSpecUrl", "NameInRequest": "firstTestTypeSpecUrl", "Type": { - "$id": "534", + "$id": "544", "Kind": "url", "Name": "url", "CrossLanguageDefinitionId": "TypeSpec.url" @@ -4748,15 +4807,15 @@ "Kind": "Client" }, { - "$id": "535", + "$id": "545", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "536", + "$id": "546", "Kind": "constant", "ValueType": { - "$id": "537", + "$id": "547", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -4772,7 +4831,7 @@ "Kind": "Constant" }, { - "$id": "538", + "$id": "548", "Name": "input", "NameInRequest": "input", "Type": { @@ -4789,7 +4848,7 @@ ], "Responses": [ { - "$id": "539", + "$id": "549", "StatusCodes": [ 204 ], @@ -4812,32 +4871,32 @@ } ], "Protocol": { - "$id": "540" + "$id": "550" }, "Parent": "FirstTestTypeSpecClient", "Parameters": [ { - "$ref": "533" + "$ref": "543" } ] }, { - "$id": "541", + "$id": "551", "Name": "ProtocolAndConvenient", "Operations": [ { - "$id": "542", + "$id": "552", "Name": "internalProtocol", "ResourceName": "ProtocolAndConvenient", "Description": "When set protocol false and convenient true, then the protocol method should be internal", "Accessibility": "public", "Parameters": [ { - "$id": "543", + "$id": "553", "Name": "firstTestTypeSpecUrl", "NameInRequest": "firstTestTypeSpecUrl", "Type": { - "$id": "544", + "$id": "554", "Kind": "url", "Name": "url", "CrossLanguageDefinitionId": "TypeSpec.url" @@ -4853,15 +4912,15 @@ "Kind": "Client" }, { - "$id": "545", + "$id": "555", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "546", + "$id": "556", "Kind": "constant", "ValueType": { - "$id": "547", + "$id": "557", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -4877,14 +4936,14 @@ "Kind": "Constant" }, { - "$id": "548", + "$id": "558", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "549", + "$id": "559", "Kind": "constant", "ValueType": { - "$id": "550", + "$id": "560", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -4900,7 +4959,7 @@ "Kind": "Constant" }, { - "$id": "551", + "$id": "561", "Name": "body", "NameInRequest": "body", "Type": { @@ -4917,7 +4976,7 @@ ], "Responses": [ { - "$id": "552", + "$id": "562", "StatusCodes": [ 200 ], @@ -4945,19 +5004,19 @@ "CrossLanguageDefinitionId": "FirstTestTypeSpec.ProtocolAndConvenient.internalProtocol" }, { - "$id": "553", + "$id": "563", "Name": "stillConvenient", "ResourceName": "ProtocolAndConvenient", "Description": "When set protocol false and convenient true, the convenient method should be generated even it has the same signature as protocol one", "Accessibility": "public", "Parameters": [ { - "$ref": "543" + "$ref": "553" } ], "Responses": [ { - "$id": "554", + "$id": "564", "StatusCodes": [ 204 ], @@ -4977,32 +5036,32 @@ } ], "Protocol": { - "$id": "555" + "$id": "565" }, "Parent": "FirstTestTypeSpecClient", "Parameters": [ { - "$ref": "543" + "$ref": "553" } ] }, { - "$id": "556", + "$id": "566", "Name": "Entity", "Operations": [ { - "$id": "557", + "$id": "567", "Name": "doSomething", "ResourceName": "Entity", "Description": "doSomething for entity", "Accessibility": "public", "Parameters": [ { - "$id": "558", + "$id": "568", "Name": "firstTestTypeSpecUrl", "NameInRequest": "firstTestTypeSpecUrl", "Type": { - "$id": "559", + "$id": "569", "Kind": "url", "Name": "url", "CrossLanguageDefinitionId": "TypeSpec.url" @@ -5018,11 +5077,11 @@ "Kind": "Client" }, { - "$id": "560", + "$id": "570", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "561", + "$id": "571", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -5036,14 +5095,14 @@ "Kind": "Method" }, { - "$id": "562", + "$id": "572", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "563", + "$id": "573", "Kind": "constant", "ValueType": { - "$id": "564", + "$id": "574", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -5061,7 +5120,7 @@ ], "Responses": [ { - "$id": "565", + "$id": "575", "StatusCodes": [ 200 ], @@ -5087,32 +5146,32 @@ } ], "Protocol": { - "$id": "566" + "$id": "576" }, "Parent": "FirstTestTypeSpecClient", "Parameters": [ { - "$ref": "558" + "$ref": "568" } ] }, { - "$id": "567", + "$id": "577", "Name": "Glossary", "Operations": [ { - "$id": "568", + "$id": "578", "Name": "doSomething", "ResourceName": "Glossary", "Description": "doSomething for glossary", "Accessibility": "public", "Parameters": [ { - "$id": "569", + "$id": "579", "Name": "firstTestTypeSpecUrl", "NameInRequest": "firstTestTypeSpecUrl", "Type": { - "$id": "570", + "$id": "580", "Kind": "url", "Name": "url", "CrossLanguageDefinitionId": "TypeSpec.url" @@ -5128,11 +5187,11 @@ "Kind": "Client" }, { - "$id": "571", + "$id": "581", "Name": "id", "NameInRequest": "id", "Type": { - "$id": "572", + "$id": "582", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -5146,11 +5205,11 @@ "Kind": "Method" }, { - "$id": "573", + "$id": "583", "Name": "h1", "NameInRequest": "h1", "Type": { - "$id": "574", + "$id": "584", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -5164,14 +5223,14 @@ "Kind": "Method" }, { - "$id": "575", + "$id": "585", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "576", + "$id": "586", "Kind": "constant", "ValueType": { - "$id": "577", + "$id": "587", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -5189,7 +5248,7 @@ ], "Responses": [ { - "$id": "578", + "$id": "588", "StatusCodes": [ 200 ], @@ -5215,26 +5274,26 @@ } ], "Protocol": { - "$id": "579" + "$id": "589" }, "Parent": "FirstTestTypeSpecClient", "Parameters": [ { - "$ref": "569" + "$ref": "579" } ] } ], "Auth": { - "$id": "580", + "$id": "590", "OAuth2": { - "$id": "581", + "$id": "591", "Scopes": [ "https://api.example.com/.default" ] }, "ApiKey": { - "$id": "582", + "$id": "592", "Name": "x-ms-api-key" } } From 9ef71a1705382743f2047c457d9b36ad31da9078 Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Tue, 13 Aug 2024 14:27:47 +0800 Subject: [PATCH 06/27] update to latest version --- package-lock.json | 10 +++++----- src/TypeSpec.Extension/Emitter.Csharp/package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index d23d349a02e..031f5409eec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2234,8 +2234,8 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "0.1.9-alpha.20240806.2", - "resolved": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNzM2MS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240806.2.tgz", + "version": "0.1.9-alpha.20240812.79", + "resolved": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA0NTc3NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-csharp-0.1.9-alpha.20240812.79.tgz", "dev": true, "dependencies": { "json-serialize-refs": "0.1.0-0" @@ -8052,7 +8052,7 @@ "license": "MIT", "dependencies": { "@autorest/csharp": "3.0.0-beta.20240625.4", - "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNzM2MS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240806.2.tgz", + "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA0NTc3NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-csharp-0.1.9-alpha.20240812.79.tgz", "json-serialize-refs": "0.1.0-0" }, "devDependencies": { @@ -8441,7 +8441,7 @@ "@types/prettier": "^2.6.3", "@typespec/compiler": "0.58.0", "@typespec/http": "0.58.0", - "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNzM2MS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240806.2.tgz", + "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA0NTc3NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-csharp-0.1.9-alpha.20240812.79.tgz", "@typespec/json-schema": "0.58.0", "@typespec/library-linter": "0.58.0", "@typespec/openapi": "0.58.0", @@ -9630,7 +9630,7 @@ "requires": {} }, "@typespec/http-client-csharp": { - "version": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNzM2MS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240806.2.tgz", + "version": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA0NTc3NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-csharp-0.1.9-alpha.20240812.79.tgz", "dev": true, "requires": { "json-serialize-refs": "0.1.0-0" diff --git a/src/TypeSpec.Extension/Emitter.Csharp/package.json b/src/TypeSpec.Extension/Emitter.Csharp/package.json index 5a02ae49b6f..533770b3b4f 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/package.json +++ b/src/TypeSpec.Extension/Emitter.Csharp/package.json @@ -36,7 +36,7 @@ "dependencies": { "@autorest/csharp": "3.0.0-beta.20240625.4", "json-serialize-refs": "0.1.0-0", - "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDAyNzM2MS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240806.2.tgz" + "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA0NTc3NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-csharp-0.1.9-alpha.20240812.79.tgz" }, "peerDependencies": { "@azure-tools/typespec-azure-core": ">=0.36.0 <1.0.0", From 3dc22a884c441f6bc0a80b3a1ae9def7d6f3fcee Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Tue, 13 Aug 2024 14:32:42 +0800 Subject: [PATCH 07/27] regen and fix --- .../LowLevel/Output/OperationMethodChainBuilder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs b/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs index 392173d232d..c4203e869c1 100644 --- a/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs +++ b/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs @@ -134,7 +134,7 @@ private void BuildSamples(LowLevelClientMethod method, List // short version samples var shouldGenerateShortVersion = DpgOperationSample.ShouldGenerateShortVersion(_client, method); - foreach (var (exampleKey, operationExample) in Operation.Examples) + foreach (var (exampleKey, operationExample) in Operation.MockExamples) { if (!shouldGenerateShortVersion && exampleKey != ExampleMockValueBuilder.ShortVersionMockExampleKey) continue; // skip the short example when we decide not to generate it From 6e28d11faab50a3a192b27d3bb0b12e1df2fda63 Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Tue, 13 Aug 2024 14:41:58 +0800 Subject: [PATCH 08/27] add the examples-directory to configuration --- src/AutoRest.CSharp/Common/Input/InputTypes/InputOperation.cs | 4 ++-- src/TypeSpec.Extension/Emitter.Csharp/src/emitter.ts | 1 + src/TypeSpec.Extension/Emitter.Csharp/src/options.ts | 1 + test/TestProjects/FirstTest-TypeSpec/Configuration.json | 3 ++- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/InputOperation.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/InputOperation.cs index ab32efaff5e..21ef8faee88 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/InputOperation.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/InputOperation.cs @@ -120,8 +120,8 @@ public static InputOperation RemoveApiVersionParam(InputOperation operation) public IReadOnlyList Examples { get; } - private readonly Dictionary _examples = new(); - public IReadOnlyDictionary MockExamples => _examples.Any() ? _examples : EnsureExamples(_examples); + private readonly Dictionary _mockExamples = new(); + public IReadOnlyDictionary MockExamples => _mockExamples.Any() ? _mockExamples : EnsureExamples(_mockExamples); public IReadOnlyList CodeModelExamples { get; internal set; } = new List(); private IReadOnlyDictionary EnsureExamples(Dictionary examples) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/emitter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/emitter.ts index 96aa04cf116..1f7ef68c95a 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/emitter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/emitter.ts @@ -72,6 +72,7 @@ export async function $onEmit(context: EmitContext) { : undefined); configurations["enable-internal-raw-data"] = options["enable-internal-raw-data"]; + configurations["examples-directory"] = options["examples-directory"]; // TODO -- this should be a relative path /* TODO: when we support to emit decorator list https://github.com/Azure/autorest.csharp/issues/4887, we will update to use emitted decorator to identify if it is azure-arm */ /* set azure-arm */ const sdkContext = await createSdkContext( diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/options.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/options.ts index a37e7d3a6d4..ba1adfc9642 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/options.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/options.ts @@ -10,6 +10,7 @@ import { dllFilePath } from "@autorest/csharp"; export interface AzureNetEmitterOptions extends NetEmitterOptions { csharpGeneratorPath?: string; "enable-internal-raw-data"?: boolean; + "generate-mock-examples"?: boolean; } export const AzureNetEmitterOptionsSchema: JSONSchemaType = diff --git a/test/TestProjects/FirstTest-TypeSpec/Configuration.json b/test/TestProjects/FirstTest-TypeSpec/Configuration.json index 38cb010e3aa..2eeca6fd3f6 100644 --- a/test/TestProjects/FirstTest-TypeSpec/Configuration.json +++ b/test/TestProjects/FirstTest-TypeSpec/Configuration.json @@ -10,5 +10,6 @@ "shared-source-folders": [ "../../../../../artifacts/bin/AutoRest.CSharp/Debug/net7.0/Generator.Shared", "../../../../../artifacts/bin/AutoRest.CSharp/Debug/net7.0/Azure.Core.Shared" - ] + ], + "examples-directory": "C:/Users/dapzhang/Documents/workspace/autorest.csharp/test/TestProjects/FirstTest-TypeSpec/examples" } From 33bfc2cc5007b71020970af02d60095c4df7a62a Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Tue, 13 Aug 2024 14:56:43 +0800 Subject: [PATCH 09/27] wip --- .../Common/Input/Configuration.cs | 7 ++++++ .../Examples/ExampleMockValueBuilder.cs | 25 +++++++++++++++++++ .../Common/Input/InputTypes/InputOperation.cs | 17 +++++++++++-- .../Output/OperationMethodChainBuilder.cs | 8 ++++++ 4 files changed, 55 insertions(+), 2 deletions(-) diff --git a/src/AutoRest.CSharp/Common/Input/Configuration.cs b/src/AutoRest.CSharp/Common/Input/Configuration.cs index 80c93e6f53d..e10a181bd3a 100644 --- a/src/AutoRest.CSharp/Common/Input/Configuration.cs +++ b/src/AutoRest.CSharp/Common/Input/Configuration.cs @@ -55,6 +55,7 @@ public static class Options public const string Flavor = "flavor"; public const string GenerateSampleProject = "generate-sample-project"; public const string GenerateTestProject = "generate-test-project"; + public const string ExamplesDirectory = "examples-directory"; // TODO - this configuration only exists here because we would like a rolling update for all libraries for this feature since it changes so many files. public const string UseModelReaderWriter = "use-model-reader-writer"; // TODO - this configuration only exists here because we would like a rolling update for all libraries for this feature since it changes so many files. @@ -113,6 +114,7 @@ public static void Initialize( bool disableXmlDocs, bool generateSampleProject, bool generateTestProject, + string? examplesDirectory, string? helperNamespace) { _outputFolder = outputFolder; @@ -185,6 +187,7 @@ public static void Initialize( DisableXmlDocs = disableXmlDocs; GenerateSampleProject = DisableXmlDocs ? false : generateSampleProject; // turn off the samples if all xml docs are explicitly disabled GenerateTestProject = generateTestProject; + ExamplesDirectory = examplesDirectory; _helperNamespace = helperNamespace ?? Namespace; } @@ -249,6 +252,8 @@ internal static (string AbsoluteProjectFolder, string RelativeProjectFolder) Par public static bool GenerateTestProject { get; private set; } + public static string? ExamplesDirectory { get; private set; } + private static ApiTypes? _apiTypes; public static ApiTypes ApiTypes => _apiTypes ?? new AzureApiTypes(); public static bool IsBranded => ApiTypes is AzureApiTypes; @@ -383,6 +388,7 @@ public static void Initialize(IPluginCommunication autoRest, string defaultNames flavor: autoRest.GetValue(Options.Flavor).GetAwaiter().GetResult() ?? "azure", // for autorest input, always branded generateSampleProject: GetOptionBoolValue(autoRest, Options.GenerateSampleProject), generateTestProject: GetOptionBoolValue(autoRest, Options.GenerateTestProject), + examplesDirectory: null, // TODO -- what we put here? helperNamespace: autoRest.GetValue(Options.HelperNamespace).GetAwaiter().GetResult(), disableXmlDocs: GetOptionBoolValue(autoRest, Options.DisableXmlDocs) ); @@ -558,6 +564,7 @@ internal static void LoadConfiguration(JsonElement root, string? projectPath, st , generateSampleProject: ReadOption(root, Options.GenerateSampleProject), generateTestProject: ReadOption(root, Options.GenerateTestProject), + examplesDirectory: ReadStringOption(root, Options.ExamplesDirectory), helperNamespace: ReadStringOption(root, Options.HelperNamespace)); } diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/ExampleMockValueBuilder.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/ExampleMockValueBuilder.cs index c83101f3303..9481ccacd44 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/ExampleMockValueBuilder.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/ExampleMockValueBuilder.cs @@ -17,6 +17,31 @@ internal class ExampleMockValueBuilder private readonly static ConcurrentDictionary _cache = new(); + public static IReadOnlyList BuildOperationExamples(InputOperation operation) + { + return new[] + { + BuildOperationExample(operation, ShortVersionMockExampleKey, false), + BuildOperationExample(operation, MockExampleAllParameterKey, true) + }; + } + + private static InputHttpOperationExample BuildOperationExample(InputOperation operation, string name, bool useAllParameters) + { + var parameterExamples = new List(operation.Parameters.Count); + foreach (var parameter in operation.Parameters) + { + if (!useAllParameters && !parameter.IsRequired) + { + continue; + } + var parameterExample = BuildParameterExample(parameter, useAllParameters); + parameterExamples.Add(parameterExample); + } + + return new(name, null, string.Empty, parameterExamples); + } + public static InputOperationExample BuildOperationExample(InputOperation operation, bool useAllParameters) { _cache.Clear(); diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/InputOperation.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/InputOperation.cs index 21ef8faee88..38d6f9d941c 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/InputOperation.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/InputOperation.cs @@ -58,7 +58,7 @@ public InputOperation( GenerateConvenienceMethod = generateConvenienceMethod; CrossLanguageDefinitionId = crossLanguageDefinitionId; KeepClientDefaultValue = keepClientDefaultValue; - Examples = examples ?? Array.Empty(); + _examples = examples; } public InputOperation() : this( @@ -118,7 +118,20 @@ public static InputOperation RemoveApiVersionParam(InputOperation operation) public string CleanName => Name.IsNullOrEmpty() ? string.Empty : Name.ToCleanName(); - public IReadOnlyList Examples { get; } + private IReadOnlyList? _examples; + public IReadOnlyList Examples => _examples ??= EnsureRealExamples(); + + private IReadOnlyList EnsureRealExamples() + { + // see if we need to generate the mock examples + if (Configuration.ExamplesDirectory != null) + { + return Array.Empty(); + } + + // build the mock examples + return ExampleMockValueBuilder.BuildOperationExamples(this); + } private readonly Dictionary _mockExamples = new(); public IReadOnlyDictionary MockExamples => _mockExamples.Any() ? _mockExamples : EnsureExamples(_mockExamples); diff --git a/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs b/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs index c4203e869c1..823ed6a6395 100644 --- a/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs +++ b/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs @@ -134,6 +134,14 @@ private void BuildSamples(LowLevelClientMethod method, List // short version samples var shouldGenerateShortVersion = DpgOperationSample.ShouldGenerateShortVersion(_client, method); + foreach (var operationExample in Operation.Examples) + { + if (!shouldGenerateShortVersion && operationExample.Name == ExampleMockValueBuilder.ShortVersionMockExampleKey) + { + + } + } + foreach (var (exampleKey, operationExample) in Operation.MockExamples) { if (!shouldGenerateShortVersion && exampleKey != ExampleMockValueBuilder.ShortVersionMockExampleKey) From b3a386ed1ba3d3407881baa12b5bf4a6f951ada6 Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Wed, 14 Aug 2024 14:12:05 +0800 Subject: [PATCH 10/27] bump a new version --- package-lock.json | 32 +++---------------- .../Emitter.Csharp/package.json | 2 +- 2 files changed, 6 insertions(+), 28 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5424a30b989..491d0804f0c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2234,10 +2234,9 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "0.1.9-alpha.20240812.79", - "resolved": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA0NTc3NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-csharp-0.1.9-alpha.20240812.79.tgz", + "version": "0.1.9-alpha.20240813.51", + "resolved": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA0OTQxNC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240813.51.tgz", "dev": true, - "license": "MIT", "dependencies": { "json-serialize-refs": "0.1.0-0" }, @@ -8124,11 +8123,7 @@ "license": "MIT", "dependencies": { "@autorest/csharp": "3.0.0-beta.20240625.4", -<<<<<<< HEAD - "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA0NTc3NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-csharp-0.1.9-alpha.20240812.79.tgz", -======= - "@typespec/http-client-csharp": "0.1.9-alpha.20240813.2", ->>>>>>> origin/feature/v3 + "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA0OTQxNC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240813.51.tgz", "json-serialize-refs": "0.1.0-0" }, "devDependencies": { @@ -8479,27 +8474,15 @@ "@types/mocha": "~9.1.0", "@types/node": "~18.13.0", "@types/prettier": "^2.6.3", -<<<<<<< HEAD - "@typespec/compiler": "0.58.0", - "@typespec/http": "0.58.0", - "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA0NTc3NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-csharp-0.1.9-alpha.20240812.79.tgz", - "@typespec/json-schema": "0.58.0", - "@typespec/library-linter": "0.58.0", - "@typespec/openapi": "0.58.0", - "@typespec/rest": "0.58.0", - "@typespec/versioning": "0.58.0", - "@typespec/xml": "0.58.0", -======= "@typespec/compiler": "0.59.0", "@typespec/http": "0.59.0", - "@typespec/http-client-csharp": "0.1.9-alpha.20240813.2", + "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA0OTQxNC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240813.51.tgz", "@typespec/json-schema": "0.59.0", "@typespec/library-linter": "0.59.0", "@typespec/openapi": "0.59.0", "@typespec/rest": "0.59.0", "@typespec/versioning": "0.59.0", "@typespec/xml": "0.59.0", ->>>>>>> origin/feature/v3 "c8": "~7.11.0", "eslint": "^8.57.0", "globals": "^15.2.0", @@ -9682,12 +9665,7 @@ "requires": {} }, "@typespec/http-client-csharp": { -<<<<<<< HEAD - "version": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA0NTc3NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-csharp-0.1.9-alpha.20240812.79.tgz", -======= - "version": "0.1.9-alpha.20240813.2", - "resolved": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA0NjMwNS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-csharp-0.1.9-alpha.20240813.2.tgz", ->>>>>>> origin/feature/v3 + "version": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA0OTQxNC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240813.51.tgz", "dev": true, "requires": { "json-serialize-refs": "0.1.0-0" diff --git a/src/TypeSpec.Extension/Emitter.Csharp/package.json b/src/TypeSpec.Extension/Emitter.Csharp/package.json index 6cb7ca41fb1..6fbf076a226 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/package.json +++ b/src/TypeSpec.Extension/Emitter.Csharp/package.json @@ -36,7 +36,7 @@ "dependencies": { "@autorest/csharp": "3.0.0-beta.20240625.4", "json-serialize-refs": "0.1.0-0", - "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA0NTc3NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2Fpackages%2Ftypespec-http-client-csharp-0.1.9-alpha.20240812.79.tgz" + "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA0OTQxNC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240813.51.tgz" }, "peerDependencies": { "@azure-tools/typespec-azure-core": ">=0.36.0 <1.0.0", From 5ef5f3e3e2576066169c139dc436f16369ace0d8 Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Wed, 14 Aug 2024 15:12:07 +0800 Subject: [PATCH 11/27] everything looks good except for the object deserialization --- .../TypeSpecInputParameterExampleConverter.cs | 57 + .../Serialization/TypeSpecSerialization.cs | 3 +- .../Output/OperationMethodChainBuilder.cs | 51 +- .../Output/Samples/DpgOperationSample.cs | 14 +- .../FirstTest-TypeSpec/Configuration.json | 4 +- .../src/Generated/Docs/Entity.xml | 131 - .../src/Generated/Docs/EnumTest.xml | 51 - .../Docs/FirstTestTypeSpecClient.xml | 2210 +-------------- .../src/Generated/Docs/Glossary.xml | 131 - .../src/Generated/Docs/HelloDemo.xml | 97 - .../src/Generated/Docs/HelloDemo2.xml | 1453 ---------- .../src/Generated/Entity.cs | 4 - .../src/Generated/EnumTest.cs | 2 - .../src/Generated/FirstTestTypeSpecClient.cs | 80 - .../src/Generated/Glossary.cs | 4 - .../src/Generated/HelloDemo.cs | 2 - .../src/Generated/HelloDemo2.cs | 18 - .../tests/Generated/Samples/Samples_Entity.cs | 158 -- .../Generated/Samples/Samples_EnumTest.cs | 71 - .../Samples_FirstTestTypeSpecClient.cs | 2472 +---------------- .../Generated/Samples/Samples_Glossary.cs | 158 -- .../Generated/Samples/Samples_HelloDemo.cs | 117 - .../Generated/Samples/Samples_HelloDemo2.cs | 1524 ---------- .../tests/Generated/Tests/EntityTests.cs | 67 - .../tests/Generated/Tests/EnumTestTests.cs | 47 - .../Tests/FirstTestTypeSpecClientTests.cs | 1128 +------- .../tests/Generated/Tests/GlossaryTests.cs | 67 - .../tests/Generated/Tests/HelloDemo2Tests.cs | 581 ---- .../tests/Generated/Tests/HelloDemoTests.cs | 44 - 29 files changed, 131 insertions(+), 10615 deletions(-) create mode 100644 src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputParameterExampleConverter.cs delete mode 100644 test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/Entity.xml delete mode 100644 test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/EnumTest.xml delete mode 100644 test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/Glossary.xml delete mode 100644 test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/HelloDemo.xml delete mode 100644 test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/HelloDemo2.xml delete mode 100644 test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_Entity.cs delete mode 100644 test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_EnumTest.cs delete mode 100644 test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_Glossary.cs delete mode 100644 test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_HelloDemo.cs delete mode 100644 test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_HelloDemo2.cs delete mode 100644 test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/EntityTests.cs delete mode 100644 test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/EnumTestTests.cs delete mode 100644 test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/GlossaryTests.cs delete mode 100644 test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/HelloDemo2Tests.cs delete mode 100644 test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/HelloDemoTests.cs diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputParameterExampleConverter.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputParameterExampleConverter.cs new file mode 100644 index 00000000000..68c74d03396 --- /dev/null +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputParameterExampleConverter.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace AutoRest.CSharp.Common.Input.Examples +{ + internal sealed class TypeSpecInputParameterExampleConverter : JsonConverter + { + private const string KindPropertyName = "kind"; + + private readonly TypeSpecReferenceHandler _referenceHandler; + + public TypeSpecInputParameterExampleConverter(TypeSpecReferenceHandler referenceHandler) + { + _referenceHandler = referenceHandler; + } + + public override InputParameterExample? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return reader.ReadReferenceAndResolve(_referenceHandler.CurrentResolver) ?? CreateInputParameterExample(ref reader, options); + } + + public override void Write(Utf8JsonWriter writer, InputParameterExample value, JsonSerializerOptions options) + => throw new NotSupportedException("Writing not supported"); + + private InputParameterExample CreateInputParameterExample(ref Utf8JsonReader reader, JsonSerializerOptions options) + { + string? id = null; + InputParameter? parameter = null; + InputTypeExample? value = null; + var isFirstProperty = true; + while (reader.TokenType != JsonTokenType.EndObject) + { + var isKnownProperty = reader.TryReadReferenceId(ref isFirstProperty, ref id) + || reader.TryReadWithConverter("parameter", options, ref parameter) + || reader.TryReadWithConverter("value", options, ref value); + + if (!isKnownProperty) + { + continue; + } + } + + var result = new InputParameterExample(parameter ?? throw new JsonException(), value ?? throw new JsonException()); + + if (id != null) + { + _referenceHandler.CurrentResolver.AddReference(id, result); + } + + return result; + } + } +} diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecSerialization.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecSerialization.cs index f32d783a0de..77677041398 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecSerialization.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecSerialization.cs @@ -41,7 +41,8 @@ internal static class TypeSpecSerialization new TypeSpecInputPrimitiveTypeConverter(referenceHandler), new TypeSpecInputDecoratorInfoConverter(referenceHandler), new TypeSpecInputTypeExampleConverter(referenceHandler), - new TypeSpecInputOperationExampleConverter(referenceHandler) + new TypeSpecInputOperationExampleConverter(referenceHandler), + new TypeSpecInputParameterExampleConverter(referenceHandler), } }; diff --git a/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs b/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs index 65a7ccc1793..eca03baf57e 100644 --- a/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs +++ b/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs @@ -134,27 +134,20 @@ private void BuildSamples(LowLevelClientMethod method, List // short version samples var shouldGenerateShortVersion = DpgOperationSample.ShouldGenerateShortVersion(_client, method); - foreach (var operationExample in Operation.Examples) + foreach (var example in Operation.Examples) { - if (!shouldGenerateShortVersion && operationExample.Name == ExampleMockValueBuilder.ShortVersionMockExampleKey) - { - - } - } - - foreach (var (exampleKey, operationExample) in Operation.MockExamples) - { - if (!shouldGenerateShortVersion && exampleKey != ExampleMockValueBuilder.ShortVersionMockExampleKey) - continue; // skip the short example when we decide not to generate it + if (!shouldGenerateShortVersion && example.Name == ExampleMockValueBuilder.ShortVersionMockExampleKey) + continue; // add protocol method sample samples.Add(new( _client, _typeFactory, method, - operationExample, + Operation, + example, false, - exampleKey)); + example.Name)); // add convenience method sample if (method.ConvenienceMethod != null && method.ConvenienceMethod.Signature.Modifiers.HasFlag(Public)) @@ -163,11 +156,39 @@ private void BuildSamples(LowLevelClientMethod method, List _client, _typeFactory, method, - operationExample, + Operation, + example, true, - exampleKey)); + example.Name)); } } + + //foreach (var (exampleKey, operationExample) in Operation.MockExamples) + //{ + // if (!shouldGenerateShortVersion && exampleKey != ExampleMockValueBuilder.ShortVersionMockExampleKey) + // continue; // skip the short example when we decide not to generate it + + // // add protocol method sample + // samples.Add(new( + // _client, + // _typeFactory, + // method, + // operationExample, + // false, + // exampleKey)); + + // // add convenience method sample + // if (method.ConvenienceMethod != null && method.ConvenienceMethod.Signature.Modifiers.HasFlag(Public)) + // { + // samples.Add(new( + // _client, + // _typeFactory, + // method, + // operationExample, + // true, + // exampleKey)); + // } + //} } private LongRunningResultRetrievalMethod? GetLongRunningResultRetrievalMethod(OperationLongRunning? longRunning) diff --git a/src/AutoRest.CSharp/LowLevel/Output/Samples/DpgOperationSample.cs b/src/AutoRest.CSharp/LowLevel/Output/Samples/DpgOperationSample.cs index 00a40727c15..68cd6baf195 100644 --- a/src/AutoRest.CSharp/LowLevel/Output/Samples/DpgOperationSample.cs +++ b/src/AutoRest.CSharp/LowLevel/Output/Samples/DpgOperationSample.cs @@ -24,19 +24,21 @@ namespace AutoRest.CSharp.Output.Samples.Models [DebuggerDisplay("{GetDebuggerDisplay(),nq}")] internal class DpgOperationSample { - public DpgOperationSample(LowLevelClient client, TypeFactory typeFactory, LowLevelClientMethod method, InputOperationExample inputOperationExample, bool isConvenienceSample, string exampleKey) + public DpgOperationSample(LowLevelClient client, TypeFactory typeFactory, LowLevelClientMethod method, InputOperation inputOperation, InputHttpOperationExample operationExample, bool isConvenienceSample, string exampleKey) { _client = client; _typeFactory = typeFactory; _method = method; - _inputOperationExample = inputOperationExample; + _inputOperation = inputOperation; + _inputOperationExample = operationExample; IsConvenienceSample = isConvenienceSample; - ExampleKey = exampleKey; + ExampleKey = exampleKey.ToCleanName(); IsAllParametersUsed = exampleKey == ExampleMockValueBuilder.MockExampleAllParameterKey; // TODO -- only work around for the response usage building. _operationMethodSignature = isConvenienceSample ? method.ConvenienceMethod!.Signature : method.ProtocolMethodSignature; } - protected internal readonly InputOperationExample _inputOperationExample; + protected internal readonly InputOperation _inputOperation; + protected internal readonly InputHttpOperationExample _inputOperationExample; protected internal readonly LowLevelClient _client; protected internal readonly LowLevelClientMethod _method; private readonly TypeFactory _typeFactory; @@ -44,8 +46,8 @@ public DpgOperationSample(LowLevelClient client, TypeFactory typeFactory, LowLev public bool IsAllParametersUsed { get; } public string ExampleKey { get; } public bool IsConvenienceSample { get; } - public string? ResourceName => _inputOperationExample.Operation.ResourceName; - public string InputOperationName => _inputOperationExample.Operation.Name; + public string? ResourceName => _inputOperation.ResourceName; + public string InputOperationName => _inputOperation.Name; public MethodSignature OperationMethodSignature => _operationMethodSignature; diff --git a/test/TestProjects/FirstTest-TypeSpec/Configuration.json b/test/TestProjects/FirstTest-TypeSpec/Configuration.json index 2eeca6fd3f6..25c17d39011 100644 --- a/test/TestProjects/FirstTest-TypeSpec/Configuration.json +++ b/test/TestProjects/FirstTest-TypeSpec/Configuration.json @@ -8,8 +8,8 @@ "generate-test-project": true, "use-model-reader-writer": true, "shared-source-folders": [ - "../../../../../artifacts/bin/AutoRest.CSharp/Debug/net7.0/Generator.Shared", - "../../../../../artifacts/bin/AutoRest.CSharp/Debug/net7.0/Azure.Core.Shared" + "../../../../../artifacts/bin/AutoRest.CSharp/Debug/net8.0/Generator.Shared", + "../../../../../artifacts/bin/AutoRest.CSharp/Debug/net8.0/Azure.Core.Shared" ], "examples-directory": "C:/Users/dapzhang/Documents/workspace/autorest.csharp/test/TestProjects/FirstTest-TypeSpec/examples" } diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/Entity.xml b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/Entity.xml deleted file mode 100644 index 04f82125200..00000000000 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/Entity.xml +++ /dev/null @@ -1,131 +0,0 @@ - - - - - -This sample shows how to call DoSomethingAsync. -"); -Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); - -Response response = await client.DoSomethingAsync(""); -]]> -This sample shows how to call DoSomethingAsync with all parameters. -"); -Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); - -Response response = await client.DoSomethingAsync(""); -]]> - - - -This sample shows how to call DoSomething. -"); -Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); - -Response response = client.DoSomething(""); -]]> -This sample shows how to call DoSomething with all parameters. -"); -Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); - -Response response = client.DoSomething(""); -]]> - - - -This sample shows how to call DoSomethingAsync and parse the result. -"); -Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); - -Response response = await client.DoSomethingAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -]]> -This sample shows how to call DoSomethingAsync with all parameters and parse the result. -"); -Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); - -Response response = await client.DoSomethingAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); -]]> - - - -This sample shows how to call DoSomething and parse the result. -"); -Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); - -Response response = client.DoSomething("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -]]> -This sample shows how to call DoSomething with all parameters and parse the result. -"); -Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); - -Response response = client.DoSomething("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); -]]> - - - \ No newline at end of file diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/EnumTest.xml b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/EnumTest.xml deleted file mode 100644 index f88c4631c97..00000000000 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/EnumTest.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - -This sample shows how to call CreateUnknownValueAsync. -"); -EnumTest client = new FirstTestTypeSpecClient(endpoint).GetEnumTestClient(); - -using RequestContent content = RequestContent.Create("Monday"); -Response response = await client.CreateUnknownValueAsync(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call CreateUnknownValueAsync with all request content. -"); -EnumTest client = new FirstTestTypeSpecClient(endpoint).GetEnumTestClient(); - -using RequestContent content = RequestContent.Create("Monday"); -Response response = await client.CreateUnknownValueAsync(content); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call CreateUnknownValue. -"); -EnumTest client = new FirstTestTypeSpecClient(endpoint).GetEnumTestClient(); - -using RequestContent content = RequestContent.Create("Monday"); -Response response = client.CreateUnknownValue(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call CreateUnknownValue with all request content. -"); -EnumTest client = new FirstTestTypeSpecClient(endpoint).GetEnumTestClient(); - -using RequestContent content = RequestContent.Create("Monday"); -Response response = client.CreateUnknownValue(content); - -Console.WriteLine(response.Status); -]]> - - - \ No newline at end of file diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/FirstTestTypeSpecClient.xml b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/FirstTestTypeSpecClient.xml index e02ec274304..7dd7fea81f1 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/FirstTestTypeSpecClient.xml +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/FirstTestTypeSpecClient.xml @@ -5,62 +5,30 @@ This sample shows how to call TopActionAsync. "); +Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); -Response response = await client.TopActionAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); -]]> -This sample shows how to call TopActionAsync with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.TopActionAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); +Response response = await client.TopActionAsync(default); ]]> This sample shows how to call TopAction. "); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.TopAction(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); -]]> -This sample shows how to call TopAction with all parameters. -"); +Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); -Response response = client.TopAction(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); +Response response = client.TopAction(default); ]]> This sample shows how to call TopActionAsync and parse the result. "); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.TopActionAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -]]> -This sample shows how to call TopActionAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); -Response response = await client.TopActionAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); +Response response = await client.TopActionAsync(default, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -69,471 +37,19 @@ Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); ]]> This sample shows how to call TopAction and parse the result. "); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.TopAction(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -]]> -This sample shows how to call TopAction with all parameters and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.TopAction(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); -]]> - - - -This sample shows how to call TopAction2Async and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.TopAction2Async(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -]]> -This sample shows how to call TopAction2Async with all parameters and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.TopAction2Async(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); -]]> - - - -This sample shows how to call TopAction2 and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.TopAction2(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -]]> -This sample shows how to call TopAction2 with all parameters and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.TopAction2(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); -]]> - - - -This sample shows how to call PatchActionAsync and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - requiredBadDescription = "", - requiredNullableList = new object[] - { - 1234 - }, - requiredFloatProperty = new object(), -}); -Response response = await client.PatchActionAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -]]> -This sample shows how to call PatchActionAsync with all request content and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - optionalLiteralString = "reject", - optionalLiteralInt = 456, - optionalLiteralFloat = 4.56F, - optionalLiteralBool = true, - requiredBadDescription = "", - optionalNullableList = new object[] - { - 1234 - }, - requiredNullableList = new object[] - { - 1234 - }, - requiredFloatProperty = new object(), - optionalFloatProperty = new object(), - optionalResourceId = "", -}); -Response response = await client.PatchActionAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); -]]> - - - -This sample shows how to call PatchAction and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - requiredBadDescription = "", - requiredNullableList = new object[] - { - 1234 - }, - requiredFloatProperty = new object(), -}); -Response response = client.PatchAction(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -]]> -This sample shows how to call PatchAction with all request content and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - optionalLiteralString = "reject", - optionalLiteralInt = 456, - optionalLiteralFloat = 4.56F, - optionalLiteralBool = true, - requiredBadDescription = "", - optionalNullableList = new object[] - { - 1234 - }, - requiredNullableList = new object[] - { - 1234 - }, - requiredFloatProperty = new object(), - optionalFloatProperty = new object(), - optionalResourceId = "", -}); -Response response = client.PatchAction(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); -]]> - - - -This sample shows how to call AnonymousBodyAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.AnonymousBodyAsync("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default, AnonymousBodyRequestRequiredLiteralString.Accept, AnonymousBodyRequestRequiredLiteralInt._123, AnonymousBodyRequestRequiredLiteralFloat._123, false); -]]> -This sample shows how to call AnonymousBodyAsync with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.AnonymousBodyAsync("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default, AnonymousBodyRequestRequiredLiteralString.Accept, AnonymousBodyRequestRequiredLiteralInt._123, AnonymousBodyRequestRequiredLiteralFloat._123, false, optionalLiteralString: AnonymousBodyRequestOptionalLiteralString.Reject, optionalLiteralInt: AnonymousBodyRequestOptionalLiteralInt._456, optionalLiteralFloat: AnonymousBodyRequestOptionalLiteralFloat._456, optionalLiteralBool: true, optionalNullableList: new int[] { 1234 }, optionalFloatProperty: (double)default, optionalResourceId: new ResourceIdentifier("")); -]]> - - - -This sample shows how to call AnonymousBody. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.AnonymousBody("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default, AnonymousBodyRequestRequiredLiteralString.Accept, AnonymousBodyRequestRequiredLiteralInt._123, AnonymousBodyRequestRequiredLiteralFloat._123, false); -]]> -This sample shows how to call AnonymousBody with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.AnonymousBody("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default, AnonymousBodyRequestRequiredLiteralString.Accept, AnonymousBodyRequestRequiredLiteralInt._123, AnonymousBodyRequestRequiredLiteralFloat._123, false, optionalLiteralString: AnonymousBodyRequestOptionalLiteralString.Reject, optionalLiteralInt: AnonymousBodyRequestOptionalLiteralInt._456, optionalLiteralFloat: AnonymousBodyRequestOptionalLiteralFloat._456, optionalLiteralBool: true, optionalNullableList: new int[] { 1234 }, optionalFloatProperty: (double)default, optionalResourceId: new ResourceIdentifier("")); -]]> - - - -This sample shows how to call AnonymousBodyAsync and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - requiredBadDescription = "", - requiredNullableList = new object[] - { - 1234 - }, - requiredFloatProperty = new object(), -}); -Response response = await client.AnonymousBodyAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -]]> -This sample shows how to call AnonymousBodyAsync with all request content and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - optionalLiteralString = "reject", - optionalLiteralInt = 456, - optionalLiteralFloat = 4.56F, - optionalLiteralBool = true, - requiredBadDescription = "", - optionalNullableList = new object[] - { - 1234 - }, - requiredNullableList = new object[] - { - 1234 - }, - requiredFloatProperty = new object(), - optionalFloatProperty = new object(), - optionalResourceId = "", -}); -Response response = await client.AnonymousBodyAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); -]]> - - - -This sample shows how to call AnonymousBody and parse the result. -"); +Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); -using RequestContent content = RequestContent.Create(new -{ - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - requiredBadDescription = "", - requiredNullableList = new object[] - { - 1234 - }, - requiredFloatProperty = new object(), -}); -Response response = client.AnonymousBody(content); +Response response = client.TopAction(default, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -545,1716 +61,6 @@ Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -]]> -This sample shows how to call AnonymousBody with all request content and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - optionalLiteralString = "reject", - optionalLiteralInt = 456, - optionalLiteralFloat = 4.56F, - optionalLiteralBool = true, - requiredBadDescription = "", - optionalNullableList = new object[] - { - 1234 - }, - requiredNullableList = new object[] - { - 1234 - }, - requiredFloatProperty = new object(), - optionalFloatProperty = new object(), - optionalResourceId = "", -}); -Response response = client.AnonymousBody(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); -]]> - - - -This sample shows how to call FriendlyModelAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.FriendlyModelAsync(""); -]]> -This sample shows how to call FriendlyModelAsync with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.FriendlyModelAsync(""); -]]> - - - -This sample shows how to call FriendlyModel. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.FriendlyModel(""); -]]> -This sample shows how to call FriendlyModel with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.FriendlyModel(""); -]]> - - - -This sample shows how to call FriendlyModelAsync and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - name = "", -}); -Response response = await client.FriendlyModelAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -]]> -This sample shows how to call FriendlyModelAsync with all request content and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - name = "", -}); -Response response = await client.FriendlyModelAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -]]> - - - -This sample shows how to call FriendlyModel and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - name = "", -}); -Response response = client.FriendlyModel(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -]]> -This sample shows how to call FriendlyModel with all request content and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - name = "", -}); -Response response = client.FriendlyModel(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -]]> - - - -This sample shows how to call AddTimeHeaderAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.AddTimeHeaderAsync(); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call AddTimeHeaderAsync with all request content. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.AddTimeHeaderAsync(); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call AddTimeHeader. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.AddTimeHeader(); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call AddTimeHeader with all request content. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.AddTimeHeader(); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call StringFormatAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); -Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); -]]> -This sample shows how to call StringFormatAsync with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); -Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); -]]> - - - -This sample shows how to call StringFormat. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); -Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); -]]> -This sample shows how to call StringFormat with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); -Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); -]]> - - - -This sample shows how to call StringFormatAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - sourceUrl = "http://localhost:3000", - guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -}); -Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call StringFormatAsync with all parameters and request content. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - sourceUrl = "http://localhost:3000", - guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -}); -Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call StringFormat. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - sourceUrl = "http://localhost:3000", - guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -}); -Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call StringFormat with all parameters and request content. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - sourceUrl = "http://localhost:3000", - guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", -}); -Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call ProjectedNameModelAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.ProjectedNameModelAsync(""); -]]> -This sample shows how to call ProjectedNameModelAsync with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.ProjectedNameModelAsync(""); -]]> - - - -This sample shows how to call ProjectedNameModel. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.ProjectedNameModel(""); -]]> -This sample shows how to call ProjectedNameModel with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.ProjectedNameModel(""); -]]> - - - -This sample shows how to call ProjectedNameModelAsync and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - name = "", -}); -Response response = await client.ProjectedNameModelAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -]]> -This sample shows how to call ProjectedNameModelAsync with all request content and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - name = "", -}); -Response response = await client.ProjectedNameModelAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -]]> - - - -This sample shows how to call ProjectedNameModel and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - name = "", -}); -Response response = client.ProjectedNameModel(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -]]> -This sample shows how to call ProjectedNameModel with all request content and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - name = "", -}); -Response response = client.ProjectedNameModel(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -]]> - - - -This sample shows how to call ReturnsAnonymousModelAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.ReturnsAnonymousModelAsync(); -]]> -This sample shows how to call ReturnsAnonymousModelAsync with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.ReturnsAnonymousModelAsync(); -]]> - - - -This sample shows how to call ReturnsAnonymousModel. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.ReturnsAnonymousModel(); -]]> -This sample shows how to call ReturnsAnonymousModel with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.ReturnsAnonymousModel(); -]]> - - - -This sample shows how to call ReturnsAnonymousModelAsync and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.ReturnsAnonymousModelAsync(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call ReturnsAnonymousModelAsync with all parameters and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.ReturnsAnonymousModelAsync(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> - - - -This sample shows how to call ReturnsAnonymousModel and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.ReturnsAnonymousModel(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call ReturnsAnonymousModel with all parameters and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.ReturnsAnonymousModel(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> - - - -This sample shows how to call HeadAsBooleanAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.HeadAsBooleanAsync(""); - -Console.WriteLine(response.GetRawResponse().Status); -]]> -This sample shows how to call HeadAsBooleanAsync with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.HeadAsBooleanAsync(""); - -Console.WriteLine(response.GetRawResponse().Status); -]]> - - - -This sample shows how to call HeadAsBoolean. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.HeadAsBoolean(""); - -Console.WriteLine(response.GetRawResponse().Status); -]]> -This sample shows how to call HeadAsBoolean with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.HeadAsBoolean(""); - -Console.WriteLine(response.GetRawResponse().Status); -]]> - - - -This sample shows how to call StringBodyAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.StringBodyAsync(""); -]]> -This sample shows how to call StringBodyAsync with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.StringBodyAsync(""); -]]> - - - -This sample shows how to call StringBody. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.StringBody(""); -]]> -This sample shows how to call StringBody with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.StringBody(""); -]]> - - - -This sample shows how to call StringBodyAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(""); -Response response = await client.StringBodyAsync(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call StringBodyAsync with all request content. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(""); -Response response = await client.StringBodyAsync(content); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call StringBody. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(""); -Response response = client.StringBody(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call StringBody with all request content. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(""); -Response response = client.StringBody(content); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call BoolBodyAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.BoolBodyAsync(true); -]]> -This sample shows how to call BoolBodyAsync with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.BoolBodyAsync(true); -]]> - - - -This sample shows how to call BoolBody. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.BoolBody(true); -]]> -This sample shows how to call BoolBody with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.BoolBody(true); -]]> - - - -This sample shows how to call BoolBodyAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(true); -Response response = await client.BoolBodyAsync(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call BoolBodyAsync with all request content. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(true); -Response response = await client.BoolBodyAsync(content); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call BoolBody. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(true); -Response response = client.BoolBody(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call BoolBody with all request content. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(true); -Response response = client.BoolBody(content); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call DateTimeBodyAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.DateTimeBodyAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); -]]> -This sample shows how to call DateTimeBodyAsync with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.DateTimeBodyAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); -]]> - - - -This sample shows how to call DateTimeBody. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.DateTimeBody(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); -]]> -This sample shows how to call DateTimeBody with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.DateTimeBody(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); -]]> - - - -This sample shows how to call DateTimeBodyAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create("2022-05-10T18:57:31.2311892Z"); -Response response = await client.DateTimeBodyAsync(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DateTimeBodyAsync with all request content. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create("2022-05-10T18:57:31.2311892Z"); -Response response = await client.DateTimeBodyAsync(content); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call DateTimeBody. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create("2022-05-10T18:57:31.2311892Z"); -Response response = client.DateTimeBody(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DateTimeBody with all request content. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create("2022-05-10T18:57:31.2311892Z"); -Response response = client.DateTimeBody(content); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call ReturnStringAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.ReturnStringAsync(); -]]> -This sample shows how to call ReturnStringAsync with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.ReturnStringAsync(); -]]> - - - -This sample shows how to call ReturnString. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.ReturnString(); -]]> -This sample shows how to call ReturnString with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.ReturnString(); -]]> - - - -This sample shows how to call ReturnStringAsync and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.ReturnStringAsync(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call ReturnStringAsync with all parameters and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.ReturnStringAsync(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> - - - -This sample shows how to call ReturnString and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.ReturnString(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call ReturnString with all parameters and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.ReturnString(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> - - - -This sample shows how to call ReturnUnknownAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.ReturnUnknownAsync(); -]]> -This sample shows how to call ReturnUnknownAsync with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.ReturnUnknownAsync(); -]]> - - - -This sample shows how to call ReturnUnknown. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.ReturnUnknown(); -]]> -This sample shows how to call ReturnUnknown with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.ReturnUnknown(); -]]> - - - -This sample shows how to call ReturnUnknownAsync and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.ReturnUnknownAsync(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call ReturnUnknownAsync with all parameters and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.ReturnUnknownAsync(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> - - - -This sample shows how to call ReturnUnknown and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.ReturnUnknown(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call ReturnUnknown with all parameters and parse the result. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.ReturnUnknown(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> - - - -This sample shows how to call RecursiveExtensionAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Extension input = new Extension(123); -Response response = await client.RecursiveExtensionAsync(input); -]]> -This sample shows how to call RecursiveExtensionAsync with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Extension input = new Extension(123) -{ - Extension = { default }, -}; -Response response = await client.RecursiveExtensionAsync(input); -]]> - - - -This sample shows how to call RecursiveExtension. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Extension input = new Extension(123); -Response response = client.RecursiveExtension(input); -]]> -This sample shows how to call RecursiveExtension with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Extension input = new Extension(123) -{ - Extension = { default }, -}; -Response response = client.RecursiveExtension(input); -]]> - - - -This sample shows how to call RecursiveExtensionAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - level = 123, -}); -Response response = await client.RecursiveExtensionAsync(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call RecursiveExtensionAsync with all request content. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - level = 123, - extension = new object[] - { - null - }, -}); -Response response = await client.RecursiveExtensionAsync(content); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call RecursiveExtension. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - level = 123, -}); -Response response = client.RecursiveExtension(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call RecursiveExtension with all request content. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - level = 123, - extension = new object[] - { - null - }, -}); -Response response = client.RecursiveExtension(content); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call ThreeLevelRecursiveAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Extendible input = new Extendible(); -Response response = await client.ThreeLevelRecursiveAsync(input); -]]> -This sample shows how to call ThreeLevelRecursiveAsync with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Extendible input = new Extendible -{ - Extension = {new ThereLevelExtension(123) - { - Extension = {default}, - }}, -}; -Response response = await client.ThreeLevelRecursiveAsync(input); -]]> - - - -This sample shows how to call ThreeLevelRecursive. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Extendible input = new Extendible(); -Response response = client.ThreeLevelRecursive(input); -]]> -This sample shows how to call ThreeLevelRecursive with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Extendible input = new Extendible -{ - Extension = {new ThereLevelExtension(123) - { - Extension = {default}, - }}, -}; -Response response = client.ThreeLevelRecursive(input); -]]> - - - -This sample shows how to call ThreeLevelRecursiveAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.ThreeLevelRecursiveAsync(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call ThreeLevelRecursiveAsync with all request content. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - extension = new object[] - { - new - { - level = 123, - extension = new object[] - { - null - }, - } - }, -}); -Response response = await client.ThreeLevelRecursiveAsync(content); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call ThreeLevelRecursive. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new object()); -Response response = client.ThreeLevelRecursive(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call ThreeLevelRecursive with all request content. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - extension = new object[] - { - new - { - level = 123, - extension = new object[] - { - null - }, - } - }, -}); -Response response = client.ThreeLevelRecursive(content); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call RecursiveModelsAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -ChildModel input = new ChildModel(123, new BaseModel[] -{ - new BaseModel(123) -}); -Response response = await client.RecursiveModelsAsync(input); -]]> -This sample shows how to call RecursiveModelsAsync with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -ChildModel input = new ChildModel(123, new BaseModel[] -{ - new BaseModel(123) -}); -Response response = await client.RecursiveModelsAsync(input); -]]> - - - -This sample shows how to call RecursiveModels. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -ChildModel input = new ChildModel(123, new BaseModel[] -{ - new BaseModel(123) -}); -Response response = client.RecursiveModels(input); -]]> -This sample shows how to call RecursiveModels with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -ChildModel input = new ChildModel(123, new BaseModel[] -{ - new BaseModel(123) -}); -Response response = client.RecursiveModels(input); -]]> - - - -This sample shows how to call RecursiveModelsAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - parent = new object[] - { - new - { - level = 123, - } - }, - level = 123, -}); -Response response = await client.RecursiveModelsAsync(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call RecursiveModelsAsync with all request content. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - parent = new object[] - { - new - { - level = 123, - } - }, - level = 123, -}); -Response response = await client.RecursiveModelsAsync(content); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call RecursiveModels. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - parent = new object[] - { - new - { - level = 123, - } - }, - level = 123, -}); -Response response = client.RecursiveModels(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call RecursiveModels with all request content. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - parent = new object[] - { - new - { - level = 123, - } - }, - level = 123, -}); -Response response = client.RecursiveModels(content); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call ContainSelfModelsAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -ContainSelf input = new ContainSelf(default); -Response response = await client.ContainSelfModelsAsync(input); -]]> -This sample shows how to call ContainSelfModelsAsync with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -ContainSelf input = new ContainSelf(default); -Response response = await client.ContainSelfModelsAsync(input); -]]> - - - -This sample shows how to call ContainSelfModels. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -ContainSelf input = new ContainSelf(default); -Response response = client.ContainSelfModels(input); -]]> -This sample shows how to call ContainSelfModels with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -ContainSelf input = new ContainSelf(default); -Response response = client.ContainSelfModels(input); -]]> - - - -This sample shows how to call ContainSelfModelsAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new { }); -Response response = await client.ContainSelfModelsAsync(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call ContainSelfModelsAsync with all request content. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new { }); -Response response = await client.ContainSelfModelsAsync(content); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call ContainSelfModels. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new { }); -Response response = client.ContainSelfModels(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call ContainSelfModels with all request content. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new { }); -Response response = client.ContainSelfModels(content); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call EnumParameterAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.EnumParameterAsync(CsProjectedEnum.CsOne); -]]> -This sample shows how to call EnumParameterAsync with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.EnumParameterAsync(CsProjectedEnum.CsOne); -]]> - - - -This sample shows how to call EnumParameter. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.EnumParameter(CsProjectedEnum.CsOne); -]]> -This sample shows how to call EnumParameter with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.EnumParameter(CsProjectedEnum.CsOne); -]]> - - - -This sample shows how to call EnumParameterAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.EnumParameterAsync(1.1F); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call EnumParameterAsync with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.EnumParameterAsync(1.1F); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call EnumParameter. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.EnumParameter(1.1F); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call EnumParameter with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.EnumParameter(1.1F); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call BodyIsModelWithProjectedEnumAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -ModelWithProjectedEnum body = new ModelWithProjectedEnum(CsProjectedEnumInModel.CsOne); -Response response = await client.BodyIsModelWithProjectedEnumAsync(body); -]]> -This sample shows how to call BodyIsModelWithProjectedEnumAsync with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -ModelWithProjectedEnum body = new ModelWithProjectedEnum(CsProjectedEnumInModel.CsOne); -Response response = await client.BodyIsModelWithProjectedEnumAsync(body); -]]> - - - -This sample shows how to call BodyIsModelWithProjectedEnum. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -ModelWithProjectedEnum body = new ModelWithProjectedEnum(CsProjectedEnumInModel.CsOne); -Response response = client.BodyIsModelWithProjectedEnum(body); -]]> -This sample shows how to call BodyIsModelWithProjectedEnum with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -ModelWithProjectedEnum body = new ModelWithProjectedEnum(CsProjectedEnumInModel.CsOne); -Response response = client.BodyIsModelWithProjectedEnum(body); -]]> - - - -This sample shows how to call BodyIsModelWithProjectedEnumAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - enumProperty = 1.1F, -}); -Response response = await client.BodyIsModelWithProjectedEnumAsync(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call BodyIsModelWithProjectedEnumAsync with all request content. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - enumProperty = 1.1F, -}); -Response response = await client.BodyIsModelWithProjectedEnumAsync(content); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call BodyIsModelWithProjectedEnum. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - enumProperty = 1.1F, -}); -Response response = client.BodyIsModelWithProjectedEnum(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call BodyIsModelWithProjectedEnum with all request content. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - enumProperty = 1.1F, -}); -Response response = client.BodyIsModelWithProjectedEnum(content); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call OptionalDictionaryAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.OptionalDictionaryAsync(); -]]> -This sample shows how to call OptionalDictionaryAsync with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.OptionalDictionaryAsync(body: new Dictionary -{ - ["key"] = 1234 -}); -]]> - - - -This sample shows how to call OptionalDictionary. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.OptionalDictionary(); -]]> -This sample shows how to call OptionalDictionary with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.OptionalDictionary(body: new Dictionary -{ - ["key"] = 1234 -}); -]]> - - - -This sample shows how to call OptionalDictionaryAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = null; -Response response = await client.OptionalDictionaryAsync(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call OptionalDictionaryAsync with all request content. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - key = 1234, -}); -Response response = await client.OptionalDictionaryAsync(content); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call OptionalDictionary. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = null; -Response response = client.OptionalDictionary(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call OptionalDictionary with all request content. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - key = 1234, -}); -Response response = client.OptionalDictionary(content); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call AzureLocationOpAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = await client.AzureLocationOpAsync(new AzureLocation(""), new AzureLocation("")); -]]> -This sample shows how to call AzureLocationOpAsync with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -AzureLocationModel body = new AzureLocationModel(new AzureLocation("")); -Response response = await client.AzureLocationOpAsync(new AzureLocation(""), new AzureLocation(""), body: body); -]]> - - - -This sample shows how to call AzureLocationOp. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -Response response = client.AzureLocationOp(new AzureLocation(""), new AzureLocation("")); -]]> -This sample shows how to call AzureLocationOp with all parameters. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -AzureLocationModel body = new AzureLocationModel(new AzureLocation("")); -Response response = client.AzureLocationOp(new AzureLocation(""), new AzureLocation(""), body: body); -]]> - - - -This sample shows how to call AzureLocationOpAsync. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = null; -Response response = await client.AzureLocationOpAsync(new AzureLocation(""), new AzureLocation(""), content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call AzureLocationOpAsync with all parameters and request content. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - location = "", -}); -Response response = await client.AzureLocationOpAsync(new AzureLocation(""), new AzureLocation(""), content); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call AzureLocationOp. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = null; -Response response = client.AzureLocationOp(new AzureLocation(""), new AzureLocation(""), content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call AzureLocationOp with all parameters and request content. -"); -FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - -using RequestContent content = RequestContent.Create(new -{ - location = "", -}); -Response response = client.AzureLocationOp(new AzureLocation(""), new AzureLocation(""), content); - -Console.WriteLine(response.Status); ]]> diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/Glossary.xml b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/Glossary.xml deleted file mode 100644 index e14131e6a11..00000000000 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/Glossary.xml +++ /dev/null @@ -1,131 +0,0 @@ - - - - - -This sample shows how to call DoSomethingAsync. -"); -Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); - -Response response = await client.DoSomethingAsync("", "

"); -]]> -This sample shows how to call DoSomethingAsync with all parameters. -"); -Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); - -Response response = await client.DoSomethingAsync("", "

"); -]]> - - - -This sample shows how to call DoSomething. -"); -Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); - -Response response = client.DoSomething("", "

"); -]]> -This sample shows how to call DoSomething with all parameters. -"); -Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); - -Response response = client.DoSomething("", "

"); -]]> - - - -This sample shows how to call DoSomethingAsync and parse the result. -"); -Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); - -Response response = await client.DoSomethingAsync("", "

", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -]]> -This sample shows how to call DoSomethingAsync with all parameters and parse the result. -"); -Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); - -Response response = await client.DoSomethingAsync("", "

", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); -]]> - - - -This sample shows how to call DoSomething and parse the result. -"); -Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); - -Response response = client.DoSomething("", "

", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -]]> -This sample shows how to call DoSomething with all parameters and parse the result. -"); -Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); - -Response response = client.DoSomething("", "

", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); -]]> - - - \ No newline at end of file diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/HelloDemo.xml b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/HelloDemo.xml deleted file mode 100644 index a097d680e17..00000000000 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/HelloDemo.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - -This sample shows how to call SayHiAsync and parse the result. -"); -HelloDemo client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemoClient(); - -Response response = await client.SayHiAsync("", "", null, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -]]> -This sample shows how to call SayHiAsync with all parameters and parse the result. -"); -HelloDemo client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemoClient(); - -Response response = await client.SayHiAsync("", "", "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); -]]> - - - -This sample shows how to call SayHi and parse the result. -"); -HelloDemo client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemoClient(); - -Response response = client.SayHi("", "", null, null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -]]> -This sample shows how to call SayHi with all parameters and parse the result. -"); -HelloDemo client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemoClient(); - -Response response = client.SayHi("", "", "", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); -]]> - - - \ No newline at end of file diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/HelloDemo2.xml b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/HelloDemo2.xml deleted file mode 100644 index d397ba46ece..00000000000 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/HelloDemo2.xml +++ /dev/null @@ -1,1453 +0,0 @@ - - - - - -This sample shows how to call HelloAgainAsync. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -RoundTripModel action = new RoundTripModel( -"", -1234, -new StringFixedEnum[] { StringFixedEnum.One }, -new Dictionary -{ - ["key"] = StringExtensibleEnum.One -}, -new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default), -BinaryData.FromObjectAsJson(new object()), -new Dictionary -{ - ["key"] = BinaryData.FromObjectAsJson(new object()) -}, -new ModelWithRequiredNullableProperties(1234, StringExtensibleEnum.One, StringFixedEnum.One), -new BinaryData[] -{ - BinaryData.FromObjectAsJson("") -}); -Response response = await client.HelloAgainAsync("", "", action); -]]> -This sample shows how to call HelloAgainAsync with all parameters. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -RoundTripModel action = new RoundTripModel( -"", -1234, -new StringFixedEnum[] { StringFixedEnum.One }, -new Dictionary -{ - ["key"] = StringExtensibleEnum.One -}, -new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default) -{ - OptionalLiteralString = ThingOptionalLiteralString.Reject, - OptionalLiteralInt = ThingOptionalLiteralInt._456, - OptionalLiteralFloat = ThingOptionalLiteralFloat._456, - OptionalLiteralBool = true, - OptionalNullableList = { 1234 }, - OptionalFloatProperty = (double)default, - OptionalResourceId = new ResourceIdentifier(""), -}, -BinaryData.FromObjectAsJson(new object()), -new Dictionary -{ - ["key"] = BinaryData.FromObjectAsJson(new object()) -}, -new ModelWithRequiredNullableProperties(1234, StringExtensibleEnum.One, StringFixedEnum.One), -new BinaryData[] -{ - BinaryData.FromObjectAsJson("") -}) -{ - IntExtensibleEnum = IntExtensibleEnum.One, - IntExtensibleEnumCollection = { IntExtensibleEnum.One }, - FloatExtensibleEnum = FloatExtensibleEnum.One, - FloatExtensibleEnumCollection = { FloatExtensibleEnum.One }, - FloatFixedEnum = FloatFixedEnum.One, - FloatFixedEnumCollection = { FloatFixedEnum.One }, - IntFixedEnum = IntFixedEnum.One, - IntFixedEnumCollection = { IntFixedEnum.One }, - StringFixedEnum = StringFixedEnum.One, - OptionalUnknown = BinaryData.FromObjectAsJson(new object()), - OptionalRecordUnknown = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, -}; -Response response = await client.HelloAgainAsync("", "", action); -]]> - - - -This sample shows how to call HelloAgain. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -RoundTripModel action = new RoundTripModel( -"", -1234, -new StringFixedEnum[] { StringFixedEnum.One }, -new Dictionary -{ - ["key"] = StringExtensibleEnum.One -}, -new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default), -BinaryData.FromObjectAsJson(new object()), -new Dictionary -{ - ["key"] = BinaryData.FromObjectAsJson(new object()) -}, -new ModelWithRequiredNullableProperties(1234, StringExtensibleEnum.One, StringFixedEnum.One), -new BinaryData[] -{ - BinaryData.FromObjectAsJson("") -}); -Response response = client.HelloAgain("", "", action); -]]> -This sample shows how to call HelloAgain with all parameters. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -RoundTripModel action = new RoundTripModel( -"", -1234, -new StringFixedEnum[] { StringFixedEnum.One }, -new Dictionary -{ - ["key"] = StringExtensibleEnum.One -}, -new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default) -{ - OptionalLiteralString = ThingOptionalLiteralString.Reject, - OptionalLiteralInt = ThingOptionalLiteralInt._456, - OptionalLiteralFloat = ThingOptionalLiteralFloat._456, - OptionalLiteralBool = true, - OptionalNullableList = { 1234 }, - OptionalFloatProperty = (double)default, - OptionalResourceId = new ResourceIdentifier(""), -}, -BinaryData.FromObjectAsJson(new object()), -new Dictionary -{ - ["key"] = BinaryData.FromObjectAsJson(new object()) -}, -new ModelWithRequiredNullableProperties(1234, StringExtensibleEnum.One, StringFixedEnum.One), -new BinaryData[] -{ - BinaryData.FromObjectAsJson("") -}) -{ - IntExtensibleEnum = IntExtensibleEnum.One, - IntExtensibleEnumCollection = { IntExtensibleEnum.One }, - FloatExtensibleEnum = FloatExtensibleEnum.One, - FloatExtensibleEnumCollection = { FloatExtensibleEnum.One }, - FloatFixedEnum = FloatFixedEnum.One, - FloatFixedEnumCollection = { FloatFixedEnum.One }, - IntFixedEnum = IntFixedEnum.One, - IntFixedEnumCollection = { IntFixedEnum.One }, - StringFixedEnum = StringFixedEnum.One, - OptionalUnknown = BinaryData.FromObjectAsJson(new object()), - OptionalRecordUnknown = - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, -}; -Response response = client.HelloAgain("", "", action); -]]> - - - -This sample shows how to call HelloAgainAsync and parse the result. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -using RequestContent content = RequestContent.Create(new -{ - requiredString = "", - requiredInt = 1234, - requiredCollection = new object[] - { - "1" - }, - requiredDictionary = new - { - key = "1", - }, - requiredModel = new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - requiredBadDescription = "", - requiredNullableList = new object[] - { - 1234 - }, - requiredFloatProperty = new object(), - }, - requiredUnknown = new object(), - requiredRecordUnknown = new - { - key = new object(), - }, - modelWithRequiredNullable = new - { - requiredNullablePrimitive = 1234, - requiredExtensibleEnum = "1", - requiredFixedEnum = "1", - }, - unionList = new object[] - { - "" - }, -}); -Response response = await client.HelloAgainAsync("", "", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("requiredString").ToString()); -Console.WriteLine(result.GetProperty("requiredInt").ToString()); -Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); -Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); -Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); -Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); -Console.WriteLine(result.GetProperty("unionList")[0].ToString()); -]]> -This sample shows how to call HelloAgainAsync with all parameters and request content and parse the result. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -using RequestContent content = RequestContent.Create(new -{ - requiredString = "", - requiredInt = 1234, - requiredCollection = new object[] - { - "1" - }, - requiredDictionary = new - { - key = "1", - }, - requiredModel = new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - optionalLiteralString = "reject", - optionalLiteralInt = 456, - optionalLiteralFloat = 4.56F, - optionalLiteralBool = true, - requiredBadDescription = "", - optionalNullableList = new object[] - { - 1234 - }, - requiredNullableList = new object[] - { - 1234 - }, - requiredFloatProperty = new object(), - optionalFloatProperty = new object(), - optionalResourceId = "", - }, - intExtensibleEnum = 1, - intExtensibleEnumCollection = new object[] - { - 1 - }, - floatExtensibleEnum = 1F, - floatExtensibleEnumCollection = new object[] - { - 1F - }, - floatFixedEnum = 1.1F, - floatFixedEnumCollection = new object[] - { - 1.1F - }, - intFixedEnum = 1, - intFixedEnumCollection = new object[] - { - 1 - }, - stringFixedEnum = "1", - requiredUnknown = new object(), - optionalUnknown = new object(), - requiredRecordUnknown = new - { - key = new object(), - }, - optionalRecordUnknown = new - { - key = new object(), - }, - modelWithRequiredNullable = new - { - requiredNullablePrimitive = 1234, - requiredExtensibleEnum = "1", - requiredFixedEnum = "1", - }, - unionList = new object[] - { - "" - }, -}); -Response response = await client.HelloAgainAsync("", "", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("requiredString").ToString()); -Console.WriteLine(result.GetProperty("requiredInt").ToString()); -Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalResourceId").ToString()); -Console.WriteLine(result.GetProperty("intExtensibleEnum").ToString()); -Console.WriteLine(result.GetProperty("intExtensibleEnumCollection")[0].ToString()); -Console.WriteLine(result.GetProperty("floatExtensibleEnum").ToString()); -Console.WriteLine(result.GetProperty("floatExtensibleEnumCollection")[0].ToString()); -Console.WriteLine(result.GetProperty("floatFixedEnum").ToString()); -Console.WriteLine(result.GetProperty("floatFixedEnumCollection")[0].ToString()); -Console.WriteLine(result.GetProperty("intFixedEnum").ToString()); -Console.WriteLine(result.GetProperty("intFixedEnumCollection")[0].ToString()); -Console.WriteLine(result.GetProperty("stringFixedEnum").ToString()); -Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); -Console.WriteLine(result.GetProperty("optionalUnknown").ToString()); -Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("optionalRecordUnknown").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("readOnlyOptionalRecordUnknown").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); -Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); -Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); -Console.WriteLine(result.GetProperty("unionList")[0].ToString()); -]]> - - - -This sample shows how to call HelloAgain and parse the result. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -using RequestContent content = RequestContent.Create(new -{ - requiredString = "", - requiredInt = 1234, - requiredCollection = new object[] - { - "1" - }, - requiredDictionary = new - { - key = "1", - }, - requiredModel = new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - requiredBadDescription = "", - requiredNullableList = new object[] - { - 1234 - }, - requiredFloatProperty = new object(), - }, - requiredUnknown = new object(), - requiredRecordUnknown = new - { - key = new object(), - }, - modelWithRequiredNullable = new - { - requiredNullablePrimitive = 1234, - requiredExtensibleEnum = "1", - requiredFixedEnum = "1", - }, - unionList = new object[] - { - "" - }, -}); -Response response = client.HelloAgain("", "", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("requiredString").ToString()); -Console.WriteLine(result.GetProperty("requiredInt").ToString()); -Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); -Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); -Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); -Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); -Console.WriteLine(result.GetProperty("unionList")[0].ToString()); -]]> -This sample shows how to call HelloAgain with all parameters and request content and parse the result. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -using RequestContent content = RequestContent.Create(new -{ - requiredString = "", - requiredInt = 1234, - requiredCollection = new object[] - { - "1" - }, - requiredDictionary = new - { - key = "1", - }, - requiredModel = new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - optionalLiteralString = "reject", - optionalLiteralInt = 456, - optionalLiteralFloat = 4.56F, - optionalLiteralBool = true, - requiredBadDescription = "", - optionalNullableList = new object[] - { - 1234 - }, - requiredNullableList = new object[] - { - 1234 - }, - requiredFloatProperty = new object(), - optionalFloatProperty = new object(), - optionalResourceId = "", - }, - intExtensibleEnum = 1, - intExtensibleEnumCollection = new object[] - { - 1 - }, - floatExtensibleEnum = 1F, - floatExtensibleEnumCollection = new object[] - { - 1F - }, - floatFixedEnum = 1.1F, - floatFixedEnumCollection = new object[] - { - 1.1F - }, - intFixedEnum = 1, - intFixedEnumCollection = new object[] - { - 1 - }, - stringFixedEnum = "1", - requiredUnknown = new object(), - optionalUnknown = new object(), - requiredRecordUnknown = new - { - key = new object(), - }, - optionalRecordUnknown = new - { - key = new object(), - }, - modelWithRequiredNullable = new - { - requiredNullablePrimitive = 1234, - requiredExtensibleEnum = "1", - requiredFixedEnum = "1", - }, - unionList = new object[] - { - "" - }, -}); -Response response = client.HelloAgain("", "", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("requiredString").ToString()); -Console.WriteLine(result.GetProperty("requiredInt").ToString()); -Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalResourceId").ToString()); -Console.WriteLine(result.GetProperty("intExtensibleEnum").ToString()); -Console.WriteLine(result.GetProperty("intExtensibleEnumCollection")[0].ToString()); -Console.WriteLine(result.GetProperty("floatExtensibleEnum").ToString()); -Console.WriteLine(result.GetProperty("floatExtensibleEnumCollection")[0].ToString()); -Console.WriteLine(result.GetProperty("floatFixedEnum").ToString()); -Console.WriteLine(result.GetProperty("floatFixedEnumCollection")[0].ToString()); -Console.WriteLine(result.GetProperty("intFixedEnum").ToString()); -Console.WriteLine(result.GetProperty("intFixedEnumCollection")[0].ToString()); -Console.WriteLine(result.GetProperty("stringFixedEnum").ToString()); -Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); -Console.WriteLine(result.GetProperty("optionalUnknown").ToString()); -Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("optionalRecordUnknown").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("readOnlyOptionalRecordUnknown").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); -Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); -Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); -Console.WriteLine(result.GetProperty("unionList")[0].ToString()); -]]> - - - -This sample shows how to call NoContentTypeAsync and parse the result. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -using RequestContent content = RequestContent.Create(new -{ - requiredString = "", - requiredInt = 1234, - requiredCollection = new object[] - { - "1" - }, - requiredDictionary = new - { - key = "1", - }, - requiredModel = new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - requiredBadDescription = "", - requiredNullableList = new object[] - { - 1234 - }, - requiredFloatProperty = new object(), - }, - requiredUnknown = new object(), - requiredRecordUnknown = new - { - key = new object(), - }, - modelWithRequiredNullable = new - { - requiredNullablePrimitive = 1234, - requiredExtensibleEnum = "1", - requiredFixedEnum = "1", - }, - unionList = new object[] - { - "" - }, -}); -Response response = await client.NoContentTypeAsync("", "", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("requiredString").ToString()); -Console.WriteLine(result.GetProperty("requiredInt").ToString()); -Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); -Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); -Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); -Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); -Console.WriteLine(result.GetProperty("unionList")[0].ToString()); -]]> -This sample shows how to call NoContentTypeAsync with all parameters and request content and parse the result. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -using RequestContent content = RequestContent.Create(new -{ - requiredString = "", - requiredInt = 1234, - requiredCollection = new object[] - { - "1" - }, - requiredDictionary = new - { - key = "1", - }, - requiredModel = new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - optionalLiteralString = "reject", - optionalLiteralInt = 456, - optionalLiteralFloat = 4.56F, - optionalLiteralBool = true, - requiredBadDescription = "", - optionalNullableList = new object[] - { - 1234 - }, - requiredNullableList = new object[] - { - 1234 - }, - requiredFloatProperty = new object(), - optionalFloatProperty = new object(), - optionalResourceId = "", - }, - intExtensibleEnum = 1, - intExtensibleEnumCollection = new object[] - { - 1 - }, - floatExtensibleEnum = 1F, - floatExtensibleEnumCollection = new object[] - { - 1F - }, - floatFixedEnum = 1.1F, - floatFixedEnumCollection = new object[] - { - 1.1F - }, - intFixedEnum = 1, - intFixedEnumCollection = new object[] - { - 1 - }, - stringFixedEnum = "1", - requiredUnknown = new object(), - optionalUnknown = new object(), - requiredRecordUnknown = new - { - key = new object(), - }, - optionalRecordUnknown = new - { - key = new object(), - }, - modelWithRequiredNullable = new - { - requiredNullablePrimitive = 1234, - requiredExtensibleEnum = "1", - requiredFixedEnum = "1", - }, - unionList = new object[] - { - "" - }, -}); -Response response = await client.NoContentTypeAsync("", "", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("requiredString").ToString()); -Console.WriteLine(result.GetProperty("requiredInt").ToString()); -Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalResourceId").ToString()); -Console.WriteLine(result.GetProperty("intExtensibleEnum").ToString()); -Console.WriteLine(result.GetProperty("intExtensibleEnumCollection")[0].ToString()); -Console.WriteLine(result.GetProperty("floatExtensibleEnum").ToString()); -Console.WriteLine(result.GetProperty("floatExtensibleEnumCollection")[0].ToString()); -Console.WriteLine(result.GetProperty("floatFixedEnum").ToString()); -Console.WriteLine(result.GetProperty("floatFixedEnumCollection")[0].ToString()); -Console.WriteLine(result.GetProperty("intFixedEnum").ToString()); -Console.WriteLine(result.GetProperty("intFixedEnumCollection")[0].ToString()); -Console.WriteLine(result.GetProperty("stringFixedEnum").ToString()); -Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); -Console.WriteLine(result.GetProperty("optionalUnknown").ToString()); -Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("optionalRecordUnknown").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("readOnlyOptionalRecordUnknown").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); -Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); -Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); -Console.WriteLine(result.GetProperty("unionList")[0].ToString()); -]]> - - - -This sample shows how to call NoContentType and parse the result. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -using RequestContent content = RequestContent.Create(new -{ - requiredString = "", - requiredInt = 1234, - requiredCollection = new object[] - { - "1" - }, - requiredDictionary = new - { - key = "1", - }, - requiredModel = new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - requiredBadDescription = "", - requiredNullableList = new object[] - { - 1234 - }, - requiredFloatProperty = new object(), - }, - requiredUnknown = new object(), - requiredRecordUnknown = new - { - key = new object(), - }, - modelWithRequiredNullable = new - { - requiredNullablePrimitive = 1234, - requiredExtensibleEnum = "1", - requiredFixedEnum = "1", - }, - unionList = new object[] - { - "" - }, -}); -Response response = client.NoContentType("", "", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("requiredString").ToString()); -Console.WriteLine(result.GetProperty("requiredInt").ToString()); -Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); -Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); -Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); -Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); -Console.WriteLine(result.GetProperty("unionList")[0].ToString()); -]]> -This sample shows how to call NoContentType with all parameters and request content and parse the result. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -using RequestContent content = RequestContent.Create(new -{ - requiredString = "", - requiredInt = 1234, - requiredCollection = new object[] - { - "1" - }, - requiredDictionary = new - { - key = "1", - }, - requiredModel = new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - optionalLiteralString = "reject", - optionalLiteralInt = 456, - optionalLiteralFloat = 4.56F, - optionalLiteralBool = true, - requiredBadDescription = "", - optionalNullableList = new object[] - { - 1234 - }, - requiredNullableList = new object[] - { - 1234 - }, - requiredFloatProperty = new object(), - optionalFloatProperty = new object(), - optionalResourceId = "", - }, - intExtensibleEnum = 1, - intExtensibleEnumCollection = new object[] - { - 1 - }, - floatExtensibleEnum = 1F, - floatExtensibleEnumCollection = new object[] - { - 1F - }, - floatFixedEnum = 1.1F, - floatFixedEnumCollection = new object[] - { - 1.1F - }, - intFixedEnum = 1, - intFixedEnumCollection = new object[] - { - 1 - }, - stringFixedEnum = "1", - requiredUnknown = new object(), - optionalUnknown = new object(), - requiredRecordUnknown = new - { - key = new object(), - }, - optionalRecordUnknown = new - { - key = new object(), - }, - modelWithRequiredNullable = new - { - requiredNullablePrimitive = 1234, - requiredExtensibleEnum = "1", - requiredFixedEnum = "1", - }, - unionList = new object[] - { - "" - }, -}); -Response response = client.NoContentType("", "", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("requiredString").ToString()); -Console.WriteLine(result.GetProperty("requiredInt").ToString()); -Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalResourceId").ToString()); -Console.WriteLine(result.GetProperty("intExtensibleEnum").ToString()); -Console.WriteLine(result.GetProperty("intExtensibleEnumCollection")[0].ToString()); -Console.WriteLine(result.GetProperty("floatExtensibleEnum").ToString()); -Console.WriteLine(result.GetProperty("floatExtensibleEnumCollection")[0].ToString()); -Console.WriteLine(result.GetProperty("floatFixedEnum").ToString()); -Console.WriteLine(result.GetProperty("floatFixedEnumCollection")[0].ToString()); -Console.WriteLine(result.GetProperty("intFixedEnum").ToString()); -Console.WriteLine(result.GetProperty("intFixedEnumCollection")[0].ToString()); -Console.WriteLine(result.GetProperty("stringFixedEnum").ToString()); -Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); -Console.WriteLine(result.GetProperty("optionalUnknown").ToString()); -Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("optionalRecordUnknown").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("readOnlyOptionalRecordUnknown").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); -Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); -Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); -Console.WriteLine(result.GetProperty("unionList")[0].ToString()); -]]> - - - -This sample shows how to call HelloDemoAgainAsync. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -Response response = await client.HelloDemoAgainAsync(); -]]> -This sample shows how to call HelloDemoAgainAsync with all parameters. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -Response response = await client.HelloDemoAgainAsync(); -]]> - - - -This sample shows how to call HelloDemoAgain. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -Response response = client.HelloDemoAgain(); -]]> -This sample shows how to call HelloDemoAgain with all parameters. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -Response response = client.HelloDemoAgain(); -]]> - - - -This sample shows how to call HelloDemoAgainAsync and parse the result. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -Response response = await client.HelloDemoAgainAsync(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -]]> -This sample shows how to call HelloDemoAgainAsync with all parameters and parse the result. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -Response response = await client.HelloDemoAgainAsync(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); -]]> - - - -This sample shows how to call HelloDemoAgain and parse the result. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -Response response = client.HelloDemoAgain(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -]]> -This sample shows how to call HelloDemoAgain with all parameters and parse the result. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -Response response = client.HelloDemoAgain(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); -]]> - - - -This sample shows how to call CreateLiteralAsync. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -Thing body = new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default); -Response response = await client.CreateLiteralAsync(body); -]]> -This sample shows how to call CreateLiteralAsync with all parameters. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -Thing body = new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default) -{ - OptionalLiteralString = ThingOptionalLiteralString.Reject, - OptionalLiteralInt = ThingOptionalLiteralInt._456, - OptionalLiteralFloat = ThingOptionalLiteralFloat._456, - OptionalLiteralBool = true, - OptionalNullableList = { 1234 }, - OptionalFloatProperty = (double)default, - OptionalResourceId = new ResourceIdentifier(""), -}; -Response response = await client.CreateLiteralAsync(body); -]]> - - - -This sample shows how to call CreateLiteral. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -Thing body = new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default); -Response response = client.CreateLiteral(body); -]]> -This sample shows how to call CreateLiteral with all parameters. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -Thing body = new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default) -{ - OptionalLiteralString = ThingOptionalLiteralString.Reject, - OptionalLiteralInt = ThingOptionalLiteralInt._456, - OptionalLiteralFloat = ThingOptionalLiteralFloat._456, - OptionalLiteralBool = true, - OptionalNullableList = { 1234 }, - OptionalFloatProperty = (double)default, - OptionalResourceId = new ResourceIdentifier(""), -}; -Response response = client.CreateLiteral(body); -]]> - - - -This sample shows how to call CreateLiteralAsync and parse the result. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -using RequestContent content = RequestContent.Create(new -{ - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - requiredBadDescription = "", - requiredNullableList = new object[] - { - 1234 - }, - requiredFloatProperty = new object(), -}); -Response response = await client.CreateLiteralAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -]]> -This sample shows how to call CreateLiteralAsync with all request content and parse the result. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -using RequestContent content = RequestContent.Create(new -{ - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - optionalLiteralString = "reject", - optionalLiteralInt = 456, - optionalLiteralFloat = 4.56F, - optionalLiteralBool = true, - requiredBadDescription = "", - optionalNullableList = new object[] - { - 1234 - }, - requiredNullableList = new object[] - { - 1234 - }, - requiredFloatProperty = new object(), - optionalFloatProperty = new object(), - optionalResourceId = "", -}); -Response response = await client.CreateLiteralAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); -]]> - - - -This sample shows how to call CreateLiteral and parse the result. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -using RequestContent content = RequestContent.Create(new -{ - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - requiredBadDescription = "", - requiredNullableList = new object[] - { - 1234 - }, - requiredFloatProperty = new object(), -}); -Response response = client.CreateLiteral(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -]]> -This sample shows how to call CreateLiteral with all request content and parse the result. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -using RequestContent content = RequestContent.Create(new -{ - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - optionalLiteralString = "reject", - optionalLiteralInt = 456, - optionalLiteralFloat = 4.56F, - optionalLiteralBool = true, - requiredBadDescription = "", - optionalNullableList = new object[] - { - 1234 - }, - requiredNullableList = new object[] - { - 1234 - }, - requiredFloatProperty = new object(), - optionalFloatProperty = new object(), - optionalResourceId = "", -}); -Response response = client.CreateLiteral(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); -]]> - - - -This sample shows how to call HelloLiteralAsync. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -Response response = await client.HelloLiteralAsync(); -]]> -This sample shows how to call HelloLiteralAsync with all parameters. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -Response response = await client.HelloLiteralAsync(); -]]> - - - -This sample shows how to call HelloLiteral. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -Response response = client.HelloLiteral(); -]]> -This sample shows how to call HelloLiteral with all parameters. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -Response response = client.HelloLiteral(); -]]> - - - -This sample shows how to call HelloLiteralAsync and parse the result. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -Response response = await client.HelloLiteralAsync(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -]]> -This sample shows how to call HelloLiteralAsync with all parameters and parse the result. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -Response response = await client.HelloLiteralAsync(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); -]]> - - - -This sample shows how to call HelloLiteral and parse the result. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -Response response = client.HelloLiteral(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -]]> -This sample shows how to call HelloLiteral with all parameters and parse the result. -"); -HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - -Response response = client.HelloLiteral(null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("name").ToString()); -Console.WriteLine(result.GetProperty("requiredUnion").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); -Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); -Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); -Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); -Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); -Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); -]]> - - - \ No newline at end of file diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Entity.cs b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Entity.cs index e69a5e2a816..9fe6984271d 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Entity.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Entity.cs @@ -57,7 +57,6 @@ internal Entity(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Azur /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - /// public virtual async Task> DoSomethingAsync(string p2, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(p2, nameof(p2)); @@ -72,7 +71,6 @@ public virtual async Task> DoSomethingAsync(string p2, Cancellat /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - /// public virtual Response DoSomething(string p2, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(p2, nameof(p2)); @@ -103,7 +101,6 @@ public virtual Response DoSomething(string p2, CancellationToken cancella /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task DoSomethingAsync(string p2, RequestContext context) { Argument.AssertNotNullOrEmpty(p2, nameof(p2)); @@ -143,7 +140,6 @@ public virtual async Task DoSomethingAsync(string p2, RequestContext c /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response DoSomething(string p2, RequestContext context) { Argument.AssertNotNullOrEmpty(p2, nameof(p2)); diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/EnumTest.cs b/test/TestProjects/FirstTest-TypeSpec/src/Generated/EnumTest.cs index d11366c4b67..1302d68d9b4 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/EnumTest.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/EnumTest.cs @@ -65,7 +65,6 @@ internal EnumTest(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Az /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task CreateUnknownValueAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -99,7 +98,6 @@ public virtual async Task CreateUnknownValueAsync(RequestContent conte /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response CreateUnknownValue(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/FirstTestTypeSpecClient.cs b/test/TestProjects/FirstTest-TypeSpec/src/Generated/FirstTestTypeSpecClient.cs index 2f8f8bd9f93..eea706dd8e7 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/FirstTestTypeSpecClient.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/FirstTestTypeSpecClient.cs @@ -196,7 +196,6 @@ public virtual Response TopAction(DateTimeOffset action, RequestContext context) /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task TopAction2Async(RequestContext context) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.TopAction2"); @@ -226,7 +225,6 @@ public virtual async Task TopAction2Async(RequestContext context) /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response TopAction2(RequestContext context) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.TopAction2"); @@ -258,7 +256,6 @@ public virtual Response TopAction2(RequestContext context) /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task PatchActionAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -292,7 +289,6 @@ public virtual async Task PatchActionAsync(RequestContent content, Req /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response PatchAction(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -330,7 +326,6 @@ public virtual Response PatchAction(RequestContent content, RequestContext conte /// optional arm id. /// The cancellation token to use. /// , or is null. - /// public virtual async Task> AnonymousBodyAsync(string name, BinaryData requiredUnion, string requiredBadDescription, IEnumerable requiredNullableList, double requiredFloatProperty, AnonymousBodyRequestRequiredLiteralString requiredLiteralString, AnonymousBodyRequestRequiredLiteralInt requiredLiteralInt, AnonymousBodyRequestRequiredLiteralFloat requiredLiteralFloat, bool requiredLiteralBool, AnonymousBodyRequestOptionalLiteralString? optionalLiteralString = null, AnonymousBodyRequestOptionalLiteralInt? optionalLiteralInt = null, AnonymousBodyRequestOptionalLiteralFloat? optionalLiteralFloat = null, bool? optionalLiteralBool = null, IEnumerable optionalNullableList = null, double? optionalFloatProperty = null, ResourceIdentifier optionalResourceId = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(name, nameof(name)); @@ -379,7 +374,6 @@ public virtual async Task> AnonymousBodyAsync(string name, Binar /// optional arm id. /// The cancellation token to use. /// , or is null. - /// public virtual Response AnonymousBody(string name, BinaryData requiredUnion, string requiredBadDescription, IEnumerable requiredNullableList, double requiredFloatProperty, AnonymousBodyRequestRequiredLiteralString requiredLiteralString, AnonymousBodyRequestRequiredLiteralInt requiredLiteralInt, AnonymousBodyRequestRequiredLiteralFloat requiredLiteralFloat, bool requiredLiteralBool, AnonymousBodyRequestOptionalLiteralString? optionalLiteralString = null, AnonymousBodyRequestOptionalLiteralInt? optionalLiteralInt = null, AnonymousBodyRequestOptionalLiteralFloat? optionalLiteralFloat = null, bool? optionalLiteralBool = null, IEnumerable optionalNullableList = null, double? optionalFloatProperty = null, ResourceIdentifier optionalResourceId = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(name, nameof(name)); @@ -429,7 +423,6 @@ public virtual Response AnonymousBody(string name, BinaryData requiredUni /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task AnonymousBodyAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -468,7 +461,6 @@ public virtual async Task AnonymousBodyAsync(RequestContent content, R /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response AnonymousBody(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -491,7 +483,6 @@ public virtual Response AnonymousBody(RequestContent content, RequestContext con /// name of the NotFriend. /// The cancellation token to use. /// is null. - /// public virtual async Task> FriendlyModelAsync(string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(name, nameof(name)); @@ -506,7 +497,6 @@ public virtual async Task> FriendlyModelAsync(string name, Canc /// name of the NotFriend. /// The cancellation token to use. /// is null. - /// public virtual Response FriendlyModel(string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(name, nameof(name)); @@ -537,7 +527,6 @@ public virtual Response FriendlyModel(string name, CancellationToken can /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task FriendlyModelAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -576,7 +565,6 @@ public virtual async Task FriendlyModelAsync(RequestContent content, R /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response FriendlyModel(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -608,7 +596,6 @@ public virtual Response FriendlyModel(RequestContent content, RequestContext con /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task AddTimeHeaderAsync(RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.AddTimeHeader"); @@ -638,7 +625,6 @@ public virtual async Task AddTimeHeaderAsync(RequestContext context = /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response AddTimeHeader(RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.AddTimeHeader"); @@ -660,7 +646,6 @@ public virtual Response AddTimeHeader(RequestContext context = null) /// The to use. /// The cancellation token to use. /// is null. - /// public virtual async Task StringFormatAsync(Guid subscriptionId, ModelWithFormat body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); @@ -676,7 +661,6 @@ public virtual async Task StringFormatAsync(Guid subscriptionId, Model /// The to use. /// The cancellation token to use. /// is null. - /// public virtual Response StringFormat(Guid subscriptionId, ModelWithFormat body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); @@ -708,7 +692,6 @@ public virtual Response StringFormat(Guid subscriptionId, ModelWithFormat body, /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task StringFormatAsync(Guid subscriptionId, RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -748,7 +731,6 @@ public virtual async Task StringFormatAsync(Guid subscriptionId, Reque /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response StringFormat(Guid subscriptionId, RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -771,7 +753,6 @@ public virtual Response StringFormat(Guid subscriptionId, RequestContent content /// name of the ModelWithProjectedName. /// The cancellation token to use. /// is null. - /// public virtual async Task> ProjectedNameModelAsync(string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(name, nameof(name)); @@ -786,7 +767,6 @@ public virtual async Task> ProjectedNameModelAsync(stri /// name of the ModelWithProjectedName. /// The cancellation token to use. /// is null. - /// public virtual Response ProjectedNameModel(string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(name, nameof(name)); @@ -817,7 +797,6 @@ public virtual Response ProjectedNameModel(string name, Cancella /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task ProjectedNameModelAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -856,7 +835,6 @@ public virtual async Task ProjectedNameModelAsync(RequestContent conte /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response ProjectedNameModel(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -877,7 +855,6 @@ public virtual Response ProjectedNameModel(RequestContent content, RequestContex /// return anonymous model. /// The cancellation token to use. - /// public virtual async Task> ReturnsAnonymousModelAsync(CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); @@ -887,7 +864,6 @@ public virtual async Task> ReturnsAnonym /// return anonymous model. /// The cancellation token to use. - /// public virtual Response ReturnsAnonymousModel(CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); @@ -913,7 +889,6 @@ public virtual Response ReturnsAnonymousModel(Can /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task ReturnsAnonymousModelAsync(RequestContext context) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.ReturnsAnonymousModel"); @@ -948,7 +923,6 @@ public virtual async Task ReturnsAnonymousModelAsync(RequestContext co /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response ReturnsAnonymousModel(RequestContext context) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.ReturnsAnonymousModel"); @@ -982,7 +956,6 @@ public virtual Response ReturnsAnonymousModel(RequestContext context) /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task> HeadAsBooleanAsync(string id, RequestContext context = null) { Argument.AssertNotNullOrEmpty(id, nameof(id)); @@ -1018,7 +991,6 @@ public virtual async Task> HeadAsBooleanAsync(string id, RequestC /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response HeadAsBoolean(string id, RequestContext context = null) { Argument.AssertNotNullOrEmpty(id, nameof(id)); @@ -1042,7 +1014,6 @@ public virtual Response HeadAsBoolean(string id, RequestContext context = /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - /// public virtual async Task StringBodyAsync(string body, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(body, nameof(body)); @@ -1058,7 +1029,6 @@ public virtual async Task StringBodyAsync(string body, CancellationTok /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - /// public virtual Response StringBody(string body, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(body, nameof(body)); @@ -1089,7 +1059,6 @@ public virtual Response StringBody(string body, CancellationToken cancellationTo /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task StringBodyAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -1128,7 +1097,6 @@ public virtual async Task StringBodyAsync(RequestContent content, Requ /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response StringBody(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -1150,7 +1118,6 @@ public virtual Response StringBody(RequestContent content, RequestContext contex /// The body parameter type is bool. /// The to use. /// The cancellation token to use. - /// public virtual async Task BoolBodyAsync(bool body, CancellationToken cancellationToken = default) { using RequestContent content = RequestContentHelper.FromObject(body); @@ -1162,7 +1129,6 @@ public virtual async Task BoolBodyAsync(bool body, CancellationToken c /// The body parameter type is bool. /// The to use. /// The cancellation token to use. - /// public virtual Response BoolBody(bool body, CancellationToken cancellationToken = default) { using RequestContent content = RequestContentHelper.FromObject(body); @@ -1191,7 +1157,6 @@ public virtual Response BoolBody(bool body, CancellationToken cancellationToken /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task BoolBodyAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -1230,7 +1195,6 @@ public virtual async Task BoolBodyAsync(RequestContent content, Reques /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response BoolBody(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -1252,7 +1216,6 @@ public virtual Response BoolBody(RequestContent content, RequestContext context /// The body parameter type is datetime. /// The to use. /// The cancellation token to use. - /// public virtual async Task DateTimeBodyAsync(DateTimeOffset body, CancellationToken cancellationToken = default) { using RequestContent content = RequestContentHelper.FromObject(body); @@ -1264,7 +1227,6 @@ public virtual async Task DateTimeBodyAsync(DateTimeOffset body, Cance /// The body parameter type is datetime. /// The to use. /// The cancellation token to use. - /// public virtual Response DateTimeBody(DateTimeOffset body, CancellationToken cancellationToken = default) { using RequestContent content = RequestContentHelper.FromObject(body); @@ -1293,7 +1255,6 @@ public virtual Response DateTimeBody(DateTimeOffset body, CancellationToken canc /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task DateTimeBodyAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -1332,7 +1293,6 @@ public virtual async Task DateTimeBodyAsync(RequestContent content, Re /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response DateTimeBody(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -1353,7 +1313,6 @@ public virtual Response DateTimeBody(RequestContent content, RequestContext cont /// The return type is datetime. /// The cancellation token to use. - /// public virtual async Task> ReturnStringAsync(CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); @@ -1363,7 +1322,6 @@ public virtual async Task> ReturnStringAsync(CancellationToken /// The return type is datetime. /// The cancellation token to use. - /// public virtual Response ReturnString(CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); @@ -1389,7 +1347,6 @@ public virtual Response ReturnString(CancellationToken cancellationToken /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task ReturnStringAsync(RequestContext context) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.ReturnString"); @@ -1424,7 +1381,6 @@ public virtual async Task ReturnStringAsync(RequestContext context) /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response ReturnString(RequestContext context) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.ReturnString"); @@ -1443,7 +1399,6 @@ public virtual Response ReturnString(RequestContext context) /// Return unknown. /// The cancellation token to use. - /// public virtual async Task> ReturnUnknownAsync(CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); @@ -1453,7 +1408,6 @@ public virtual async Task> ReturnUnknownAsync(CancellationT /// Return unknown. /// The cancellation token to use. - /// public virtual Response ReturnUnknown(CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); @@ -1479,7 +1433,6 @@ public virtual Response ReturnUnknown(CancellationToken cancellation /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task ReturnUnknownAsync(RequestContext context) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.ReturnUnknown"); @@ -1514,7 +1467,6 @@ public virtual async Task ReturnUnknownAsync(RequestContext context) /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response ReturnUnknown(RequestContext context) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.ReturnUnknown"); @@ -1535,7 +1487,6 @@ public virtual Response ReturnUnknown(RequestContext context) /// The to use. /// The cancellation token to use. /// is null. - /// public virtual async Task RecursiveExtensionAsync(Extension input, CancellationToken cancellationToken = default) { Argument.AssertNotNull(input, nameof(input)); @@ -1550,7 +1501,6 @@ public virtual async Task RecursiveExtensionAsync(Extension input, Can /// The to use. /// The cancellation token to use. /// is null. - /// public virtual Response RecursiveExtension(Extension input, CancellationToken cancellationToken = default) { Argument.AssertNotNull(input, nameof(input)); @@ -1581,7 +1531,6 @@ public virtual Response RecursiveExtension(Extension input, CancellationToken ca /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task RecursiveExtensionAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -1620,7 +1569,6 @@ public virtual async Task RecursiveExtensionAsync(RequestContent conte /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response RecursiveExtension(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -1643,7 +1591,6 @@ public virtual Response RecursiveExtension(RequestContent content, RequestContex /// The to use. /// The cancellation token to use. /// is null. - /// public virtual async Task ThreeLevelRecursiveAsync(Extendible input, CancellationToken cancellationToken = default) { Argument.AssertNotNull(input, nameof(input)); @@ -1658,7 +1605,6 @@ public virtual async Task ThreeLevelRecursiveAsync(Extendible input, C /// The to use. /// The cancellation token to use. /// is null. - /// public virtual Response ThreeLevelRecursive(Extendible input, CancellationToken cancellationToken = default) { Argument.AssertNotNull(input, nameof(input)); @@ -1689,7 +1635,6 @@ public virtual Response ThreeLevelRecursive(Extendible input, CancellationToken /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task ThreeLevelRecursiveAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -1728,7 +1673,6 @@ public virtual async Task ThreeLevelRecursiveAsync(RequestContent cont /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response ThreeLevelRecursive(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -1751,7 +1695,6 @@ public virtual Response ThreeLevelRecursive(RequestContent content, RequestConte /// The to use. /// The cancellation token to use. /// is null. - /// public virtual async Task RecursiveModelsAsync(ChildModel input, CancellationToken cancellationToken = default) { Argument.AssertNotNull(input, nameof(input)); @@ -1766,7 +1709,6 @@ public virtual async Task RecursiveModelsAsync(ChildModel input, Cance /// The to use. /// The cancellation token to use. /// is null. - /// public virtual Response RecursiveModels(ChildModel input, CancellationToken cancellationToken = default) { Argument.AssertNotNull(input, nameof(input)); @@ -1797,7 +1739,6 @@ public virtual Response RecursiveModels(ChildModel input, CancellationToken canc /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task RecursiveModelsAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -1836,7 +1777,6 @@ public virtual async Task RecursiveModelsAsync(RequestContent content, /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response RecursiveModels(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -1859,7 +1799,6 @@ public virtual Response RecursiveModels(RequestContent content, RequestContext c /// The to use. /// The cancellation token to use. /// is null. - /// public virtual async Task ContainSelfModelsAsync(ContainSelf input, CancellationToken cancellationToken = default) { Argument.AssertNotNull(input, nameof(input)); @@ -1874,7 +1813,6 @@ public virtual async Task ContainSelfModelsAsync(ContainSelf input, Ca /// The to use. /// The cancellation token to use. /// is null. - /// public virtual Response ContainSelfModels(ContainSelf input, CancellationToken cancellationToken = default) { Argument.AssertNotNull(input, nameof(input)); @@ -1905,7 +1843,6 @@ public virtual Response ContainSelfModels(ContainSelf input, CancellationToken c /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task ContainSelfModelsAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -1944,7 +1881,6 @@ public virtual async Task ContainSelfModelsAsync(RequestContent conten /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response ContainSelfModels(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -1966,7 +1902,6 @@ public virtual Response ContainSelfModels(RequestContent content, RequestContext /// test enum parameter. /// The to use. /// The cancellation token to use. - /// public virtual async Task EnumParameterAsync(CsProjectedEnum p1, CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); @@ -1977,7 +1912,6 @@ public virtual async Task EnumParameterAsync(CsProjectedEnum p1, Cance /// test enum parameter. /// The to use. /// The cancellation token to use. - /// public virtual Response EnumParameter(CsProjectedEnum p1, CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); @@ -2004,7 +1938,6 @@ public virtual Response EnumParameter(CsProjectedEnum p1, CancellationToken canc /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task EnumParameterAsync(float p1, RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.EnumParameter"); @@ -2040,7 +1973,6 @@ public virtual async Task EnumParameterAsync(float p1, RequestContext /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response EnumParameter(float p1, RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.EnumParameter"); @@ -2061,7 +1993,6 @@ public virtual Response EnumParameter(float p1, RequestContext context = null) /// The to use. /// The cancellation token to use. /// is null. - /// public virtual async Task BodyIsModelWithProjectedEnumAsync(ModelWithProjectedEnum body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); @@ -2076,7 +2007,6 @@ public virtual async Task BodyIsModelWithProjectedEnumAsync(ModelWithP /// The to use. /// The cancellation token to use. /// is null. - /// public virtual Response BodyIsModelWithProjectedEnum(ModelWithProjectedEnum body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); @@ -2107,7 +2037,6 @@ public virtual Response BodyIsModelWithProjectedEnum(ModelWithProjectedEnum body /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task BodyIsModelWithProjectedEnumAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -2146,7 +2075,6 @@ public virtual async Task BodyIsModelWithProjectedEnumAsync(RequestCon /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response BodyIsModelWithProjectedEnum(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -2168,7 +2096,6 @@ public virtual Response BodyIsModelWithProjectedEnum(RequestContent content, Req /// test optional dictionary. /// The where TKey is of type , where TValue is of type to use. /// The cancellation token to use. - /// public virtual async Task OptionalDictionaryAsync(IDictionary body = null, CancellationToken cancellationToken = default) { using RequestContent content = body != null ? RequestContentHelper.FromDictionary(body) : null; @@ -2180,7 +2107,6 @@ public virtual async Task OptionalDictionaryAsync(IDictionary test optional dictionary. /// The where TKey is of type , where TValue is of type to use. /// The cancellation token to use. - /// public virtual Response OptionalDictionary(IDictionary body = null, CancellationToken cancellationToken = default) { using RequestContent content = body != null ? RequestContentHelper.FromDictionary(body) : null; @@ -2208,7 +2134,6 @@ public virtual Response OptionalDictionary(IDictionary body = null, /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task OptionalDictionaryAsync(RequestContent content, RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.OptionalDictionary"); @@ -2244,7 +2169,6 @@ public virtual async Task OptionalDictionaryAsync(RequestContent conte /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response OptionalDictionary(RequestContent content, RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.OptionalDictionary"); @@ -2266,7 +2190,6 @@ public virtual Response OptionalDictionary(RequestContent content, RequestContex /// The to use. /// The to use. /// The cancellation token to use. - /// public virtual async Task AzureLocationOpAsync(AzureLocation location, AzureLocation regenLocation, AzureLocationModel body = null, CancellationToken cancellationToken = default) { using RequestContent content = body?.ToRequestContent(); @@ -2280,7 +2203,6 @@ public virtual async Task AzureLocationOpAsync(AzureLocation location, /// The to use. /// The to use. /// The cancellation token to use. - /// public virtual Response AzureLocationOp(AzureLocation location, AzureLocation regenLocation, AzureLocationModel body = null, CancellationToken cancellationToken = default) { using RequestContent content = body?.ToRequestContent(); @@ -2310,7 +2232,6 @@ public virtual Response AzureLocationOp(AzureLocation location, AzureLocation re /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task AzureLocationOpAsync(AzureLocation location, AzureLocation regenLocation, RequestContent content, RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.AzureLocationOp"); @@ -2348,7 +2269,6 @@ public virtual async Task AzureLocationOpAsync(AzureLocation location, /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response AzureLocationOp(AzureLocation location, AzureLocation regenLocation, RequestContent content, RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.AzureLocationOp"); diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Glossary.cs b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Glossary.cs index 8ac6f9a7af6..1bb9d8fc290 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Glossary.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Glossary.cs @@ -58,7 +58,6 @@ internal Glossary(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Az /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - /// public virtual async Task> DoSomethingAsync(string id, string h1, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(id, nameof(id)); @@ -75,7 +74,6 @@ public virtual async Task> DoSomethingAsync(string id, string h1 /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - /// public virtual Response DoSomething(string id, string h1, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(id, nameof(id)); @@ -108,7 +106,6 @@ public virtual Response DoSomething(string id, string h1, CancellationTok /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task DoSomethingAsync(string id, string h1, RequestContext context) { Argument.AssertNotNullOrEmpty(id, nameof(id)); @@ -150,7 +147,6 @@ public virtual async Task DoSomethingAsync(string id, string h1, Reque /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response DoSomething(string id, string h1, RequestContext context) { Argument.AssertNotNullOrEmpty(id, nameof(id)); diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/HelloDemo.cs b/test/TestProjects/FirstTest-TypeSpec/src/Generated/HelloDemo.cs index 63613a534e2..933dac61cb3 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/HelloDemo.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/HelloDemo.cs @@ -67,7 +67,6 @@ internal HelloDemo(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, A /// or is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task SayHiAsync(string headParameter, string queryParameter, string optionalQuery, RequestContext context) { Argument.AssertNotNull(headParameter, nameof(headParameter)); @@ -104,7 +103,6 @@ public virtual async Task SayHiAsync(string headParameter, string quer /// or is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response SayHi(string headParameter, string queryParameter, string optionalQuery, RequestContext context) { Argument.AssertNotNull(headParameter, nameof(headParameter)); diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/HelloDemo2.cs b/test/TestProjects/FirstTest-TypeSpec/src/Generated/HelloDemo2.cs index 993f2260f1a..fc7d0d23df2 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/HelloDemo2.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/HelloDemo2.cs @@ -59,7 +59,6 @@ internal HelloDemo2(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, /// The cancellation token to use. /// , or is null. /// is an empty string, and was expected to be non-empty. - /// public virtual async Task> HelloAgainAsync(string p2, string p1, RoundTripModel action, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(p2, nameof(p2)); @@ -79,7 +78,6 @@ public virtual async Task> HelloAgainAsync(string p2, s /// The cancellation token to use. /// , or is null. /// is an empty string, and was expected to be non-empty. - /// public virtual Response HelloAgain(string p2, string p1, RoundTripModel action, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(p2, nameof(p2)); @@ -115,7 +113,6 @@ public virtual Response HelloAgain(string p2, string p1, RoundTr /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task HelloAgainAsync(string p2, string p1, RequestContent content, RequestContext context = null) { Argument.AssertNotNullOrEmpty(p2, nameof(p2)); @@ -159,7 +156,6 @@ public virtual async Task HelloAgainAsync(string p2, string p1, Reques /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response HelloAgain(string p2, string p1, RequestContent content, RequestContext context = null) { Argument.AssertNotNullOrEmpty(p2, nameof(p2)); @@ -198,7 +194,6 @@ public virtual Response HelloAgain(string p2, string p1, RequestContent content, /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task NoContentTypeAsync(string p2, string p1, RequestContent content, RequestContext context = null) { Argument.AssertNotNullOrEmpty(p2, nameof(p2)); @@ -237,7 +232,6 @@ public virtual async Task NoContentTypeAsync(string p2, string p1, Req /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response NoContentType(string p2, string p1, RequestContent content, RequestContext context = null) { Argument.AssertNotNullOrEmpty(p2, nameof(p2)); @@ -260,7 +254,6 @@ public virtual Response NoContentType(string p2, string p1, RequestContent conte /// Return hi in demo2. /// The cancellation token to use. - /// public virtual async Task> HelloDemoAgainAsync(CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); @@ -270,7 +263,6 @@ public virtual async Task> HelloDemoAgainAsync(CancellationToken /// Return hi in demo2. /// The cancellation token to use. - /// public virtual Response HelloDemoAgain(CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); @@ -296,7 +288,6 @@ public virtual Response HelloDemoAgain(CancellationToken cancellationToke /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task HelloDemoAgainAsync(RequestContext context) { using var scope = ClientDiagnostics.CreateScope("HelloDemo2.HelloDemoAgain"); @@ -331,7 +322,6 @@ public virtual async Task HelloDemoAgainAsync(RequestContext context) /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response HelloDemoAgain(RequestContext context) { using var scope = ClientDiagnostics.CreateScope("HelloDemo2.HelloDemoAgain"); @@ -352,7 +342,6 @@ public virtual Response HelloDemoAgain(RequestContext context) /// The to use. /// The cancellation token to use. /// is null. - /// public virtual async Task> CreateLiteralAsync(Thing body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); @@ -367,7 +356,6 @@ public virtual async Task> CreateLiteralAsync(Thing body, Cancel /// The to use. /// The cancellation token to use. /// is null. - /// public virtual Response CreateLiteral(Thing body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); @@ -398,7 +386,6 @@ public virtual Response CreateLiteral(Thing body, CancellationToken cance /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task CreateLiteralAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -437,7 +424,6 @@ public virtual async Task CreateLiteralAsync(RequestContent content, R /// is null. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response CreateLiteral(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -458,7 +444,6 @@ public virtual Response CreateLiteral(RequestContent content, RequestContext con /// Send literal parameters. /// The cancellation token to use. - /// public virtual async Task> HelloLiteralAsync(CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); @@ -468,7 +453,6 @@ public virtual async Task> HelloLiteralAsync(CancellationToken c /// Send literal parameters. /// The cancellation token to use. - /// public virtual Response HelloLiteral(CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); @@ -494,7 +478,6 @@ public virtual Response HelloLiteral(CancellationToken cancellationToken /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual async Task HelloLiteralAsync(RequestContext context) { using var scope = ClientDiagnostics.CreateScope("HelloDemo2.HelloLiteral"); @@ -529,7 +512,6 @@ public virtual async Task HelloLiteralAsync(RequestContext context) /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - /// public virtual Response HelloLiteral(RequestContext context) { using var scope = ClientDiagnostics.CreateScope("HelloDemo2.HelloLiteral"); diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_Entity.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_Entity.cs deleted file mode 100644 index 52f00269dd5..00000000000 --- a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_Entity.cs +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading.Tasks; -using Azure; -using Azure.Identity; -using FirstTestTypeSpec.Models; -using NUnit.Framework; - -namespace FirstTestTypeSpec.Samples -{ - public partial class Samples_Entity - { - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_DoSomething_ShortVersion() - { - Uri endpoint = new Uri(""); - Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); - - Response response = client.DoSomething("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_DoSomething_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); - - Response response = await client.DoSomethingAsync("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_DoSomething_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); - - Response response = client.DoSomething(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_DoSomething_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); - - Response response = await client.DoSomethingAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_DoSomething_AllParameters() - { - Uri endpoint = new Uri(""); - Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); - - Response response = client.DoSomething("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_DoSomething_AllParameters_Async() - { - Uri endpoint = new Uri(""); - Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); - - Response response = await client.DoSomethingAsync("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Entity_DoSomething_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); - - Response response = client.DoSomething(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Entity_DoSomething_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); - - Response response = await client.DoSomethingAsync(""); - } - } -} diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_EnumTest.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_EnumTest.cs deleted file mode 100644 index d969afd51f3..00000000000 --- a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_EnumTest.cs +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Identity; -using NUnit.Framework; - -namespace FirstTestTypeSpec.Samples -{ - public partial class Samples_EnumTest - { - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_EnumTest_CreateUnknownValue_ShortVersion() - { - Uri endpoint = new Uri(""); - EnumTest client = new FirstTestTypeSpecClient(endpoint).GetEnumTestClient(); - - using RequestContent content = RequestContent.Create("Monday"); - Response response = client.CreateUnknownValue(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_EnumTest_CreateUnknownValue_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - EnumTest client = new FirstTestTypeSpecClient(endpoint).GetEnumTestClient(); - - using RequestContent content = RequestContent.Create("Monday"); - Response response = await client.CreateUnknownValueAsync(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_EnumTest_CreateUnknownValue_AllParameters() - { - Uri endpoint = new Uri(""); - EnumTest client = new FirstTestTypeSpecClient(endpoint).GetEnumTestClient(); - - using RequestContent content = RequestContent.Create("Monday"); - Response response = client.CreateUnknownValue(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_EnumTest_CreateUnknownValue_AllParameters_Async() - { - Uri endpoint = new Uri(""); - EnumTest client = new FirstTestTypeSpecClient(endpoint).GetEnumTestClient(); - - using RequestContent content = RequestContent.Create("Monday"); - Response response = await client.CreateUnknownValueAsync(content); - - Console.WriteLine(response.Status); - } - } -} diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_FirstTestTypeSpecClient.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_FirstTestTypeSpecClient.cs index eade47ce3a9..73e8b96b8ff 100644 --- a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_FirstTestTypeSpecClient.cs +++ b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_FirstTestTypeSpecClient.cs @@ -6,11 +6,9 @@ #nullable disable using System; -using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; -using Azure.Core; using Azure.Identity; using FirstTestTypeSpec.Models; using NUnit.Framework; @@ -21,12 +19,12 @@ public partial class Samples_FirstTestTypeSpecClient { [Test] [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_TopAction_ShortVersion() + public void Example_FirstTestTypeSpec_TopAction_ForTestTopAction() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - Response response = client.TopAction(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); + Response response = client.TopAction(default, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -42,12 +40,12 @@ public void Example_FirstTestTypeSpec_TopAction_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_TopAction_ShortVersion_Async() + public async Task Example_FirstTestTypeSpec_TopAction_ForTestTopAction_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - Response response = await client.TopActionAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); + Response response = await client.TopActionAsync(default, null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -63,2468 +61,22 @@ public async Task Example_FirstTestTypeSpec_TopAction_ShortVersion_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_TopAction_ShortVersion_Convenience() + public void Example_FirstTestTypeSpec_TopAction_ForTestTopAction_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - Response response = client.TopAction(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); + Response response = client.TopAction(default); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_TopAction_ShortVersion_Convenience_Async() + public async Task Example_FirstTestTypeSpec_TopAction_ForTestTopAction_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - Response response = await client.TopActionAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_TopAction_AllParameters() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.TopAction(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_TopAction_AllParameters_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.TopActionAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_TopAction_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.TopAction(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_TopAction_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.TopActionAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_TopAction2_ShortVersion() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.TopAction2(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_TopAction2_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.TopAction2Async(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_TopAction2_AllParameters() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.TopAction2(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_TopAction2_AllParameters_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.TopAction2Async(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_PatchAction_ShortVersion() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - requiredBadDescription = "", - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - }); - Response response = client.PatchAction(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_PatchAction_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - requiredBadDescription = "", - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - }); - Response response = await client.PatchActionAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_PatchAction_AllParameters() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - optionalLiteralString = "reject", - optionalLiteralInt = 456, - optionalLiteralFloat = 4.56F, - optionalLiteralBool = true, - requiredBadDescription = "", - optionalNullableList = new object[] - { -1234 - }, - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - optionalFloatProperty = new object(), - optionalResourceId = "", - }); - Response response = client.PatchAction(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_PatchAction_AllParameters_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - optionalLiteralString = "reject", - optionalLiteralInt = 456, - optionalLiteralFloat = 4.56F, - optionalLiteralBool = true, - requiredBadDescription = "", - optionalNullableList = new object[] - { -1234 - }, - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - optionalFloatProperty = new object(), - optionalResourceId = "", - }); - Response response = await client.PatchActionAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_AnonymousBody_ShortVersion() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - requiredBadDescription = "", - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - }); - Response response = client.AnonymousBody(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_AnonymousBody_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - requiredBadDescription = "", - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - }); - Response response = await client.AnonymousBodyAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_AnonymousBody_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.AnonymousBody("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default, AnonymousBodyRequestRequiredLiteralString.Accept, AnonymousBodyRequestRequiredLiteralInt._123, AnonymousBodyRequestRequiredLiteralFloat._123, false); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_AnonymousBody_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.AnonymousBodyAsync("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default, AnonymousBodyRequestRequiredLiteralString.Accept, AnonymousBodyRequestRequiredLiteralInt._123, AnonymousBodyRequestRequiredLiteralFloat._123, false); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_AnonymousBody_AllParameters() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - optionalLiteralString = "reject", - optionalLiteralInt = 456, - optionalLiteralFloat = 4.56F, - optionalLiteralBool = true, - requiredBadDescription = "", - optionalNullableList = new object[] - { -1234 - }, - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - optionalFloatProperty = new object(), - optionalResourceId = "", - }); - Response response = client.AnonymousBody(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_AnonymousBody_AllParameters_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - optionalLiteralString = "reject", - optionalLiteralInt = 456, - optionalLiteralFloat = 4.56F, - optionalLiteralBool = true, - requiredBadDescription = "", - optionalNullableList = new object[] - { -1234 - }, - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - optionalFloatProperty = new object(), - optionalResourceId = "", - }); - Response response = await client.AnonymousBodyAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_AnonymousBody_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.AnonymousBody("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default, AnonymousBodyRequestRequiredLiteralString.Accept, AnonymousBodyRequestRequiredLiteralInt._123, AnonymousBodyRequestRequiredLiteralFloat._123, false, optionalLiteralString: AnonymousBodyRequestOptionalLiteralString.Reject, optionalLiteralInt: AnonymousBodyRequestOptionalLiteralInt._456, optionalLiteralFloat: AnonymousBodyRequestOptionalLiteralFloat._456, optionalLiteralBool: true, optionalNullableList: new int[] { 1234 }, optionalFloatProperty: (double)default, optionalResourceId: new ResourceIdentifier("")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_AnonymousBody_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.AnonymousBodyAsync("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default, AnonymousBodyRequestRequiredLiteralString.Accept, AnonymousBodyRequestRequiredLiteralInt._123, AnonymousBodyRequestRequiredLiteralFloat._123, false, optionalLiteralString: AnonymousBodyRequestOptionalLiteralString.Reject, optionalLiteralInt: AnonymousBodyRequestOptionalLiteralInt._456, optionalLiteralFloat: AnonymousBodyRequestOptionalLiteralFloat._456, optionalLiteralBool: true, optionalNullableList: new int[] { 1234 }, optionalFloatProperty: (double)default, optionalResourceId: new ResourceIdentifier("")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_FriendlyModel_ShortVersion() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - name = "", - }); - Response response = client.FriendlyModel(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_FriendlyModel_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - name = "", - }); - Response response = await client.FriendlyModelAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_FriendlyModel_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.FriendlyModel(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_FriendlyModel_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.FriendlyModelAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_FriendlyModel_AllParameters() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - name = "", - }); - Response response = client.FriendlyModel(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_FriendlyModel_AllParameters_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - name = "", - }); - Response response = await client.FriendlyModelAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_FriendlyModel_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.FriendlyModel(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_FriendlyModel_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.FriendlyModelAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_AddTimeHeader_ShortVersion() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.AddTimeHeader(); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_AddTimeHeader_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.AddTimeHeaderAsync(); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_AddTimeHeader_AllParameters() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.AddTimeHeader(); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_AddTimeHeader_AllParameters_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.AddTimeHeaderAsync(); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_StringFormat_ShortVersion() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - sourceUrl = "http://localhost:3000", - guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - }); - Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_StringFormat_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - sourceUrl = "http://localhost:3000", - guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - }); - Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_StringFormat_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); - Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_StringFormat_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); - Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_StringFormat_AllParameters() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - sourceUrl = "http://localhost:3000", - guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - }); - Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_StringFormat_AllParameters_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - sourceUrl = "http://localhost:3000", - guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - }); - Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_StringFormat_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); - Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_StringFormat_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); - Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_ProjectedNameModel_ShortVersion() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - name = "", - }); - Response response = client.ProjectedNameModel(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_ProjectedNameModel_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - name = "", - }); - Response response = await client.ProjectedNameModelAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_ProjectedNameModel_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.ProjectedNameModel(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_ProjectedNameModel_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.ProjectedNameModelAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_ProjectedNameModel_AllParameters() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - name = "", - }); - Response response = client.ProjectedNameModel(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_ProjectedNameModel_AllParameters_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - name = "", - }); - Response response = await client.ProjectedNameModelAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_ProjectedNameModel_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.ProjectedNameModel(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_ProjectedNameModel_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.ProjectedNameModelAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_ReturnsAnonymousModel_ShortVersion() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.ReturnsAnonymousModel(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_ReturnsAnonymousModel_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.ReturnsAnonymousModelAsync(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_ReturnsAnonymousModel_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.ReturnsAnonymousModel(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_ReturnsAnonymousModel_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.ReturnsAnonymousModelAsync(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_ReturnsAnonymousModel_AllParameters() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.ReturnsAnonymousModel(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_ReturnsAnonymousModel_AllParameters_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.ReturnsAnonymousModelAsync(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_ReturnsAnonymousModel_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.ReturnsAnonymousModel(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_ReturnsAnonymousModel_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.ReturnsAnonymousModelAsync(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_HeadAsBoolean_ShortVersion() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.HeadAsBoolean(""); - - Console.WriteLine(response.GetRawResponse().Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_HeadAsBoolean_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.HeadAsBooleanAsync(""); - - Console.WriteLine(response.GetRawResponse().Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_HeadAsBoolean_AllParameters() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.HeadAsBoolean(""); - - Console.WriteLine(response.GetRawResponse().Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_HeadAsBoolean_AllParameters_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.HeadAsBooleanAsync(""); - - Console.WriteLine(response.GetRawResponse().Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_StringBody_ShortVersion() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(""); - Response response = client.StringBody(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_StringBody_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(""); - Response response = await client.StringBodyAsync(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_StringBody_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.StringBody(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_StringBody_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.StringBodyAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_StringBody_AllParameters() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(""); - Response response = client.StringBody(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_StringBody_AllParameters_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(""); - Response response = await client.StringBodyAsync(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_StringBody_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.StringBody(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_StringBody_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.StringBodyAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_BoolBody_ShortVersion() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(true); - Response response = client.BoolBody(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_BoolBody_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(true); - Response response = await client.BoolBodyAsync(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_BoolBody_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.BoolBody(true); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_BoolBody_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.BoolBodyAsync(true); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_BoolBody_AllParameters() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(true); - Response response = client.BoolBody(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_BoolBody_AllParameters_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(true); - Response response = await client.BoolBodyAsync(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_BoolBody_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.BoolBody(true); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_BoolBody_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.BoolBodyAsync(true); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_DateTimeBody_ShortVersion() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create("2022-05-10T18:57:31.2311892Z"); - Response response = client.DateTimeBody(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_DateTimeBody_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create("2022-05-10T18:57:31.2311892Z"); - Response response = await client.DateTimeBodyAsync(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_DateTimeBody_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.DateTimeBody(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_DateTimeBody_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.DateTimeBodyAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_DateTimeBody_AllParameters() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create("2022-05-10T18:57:31.2311892Z"); - Response response = client.DateTimeBody(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_DateTimeBody_AllParameters_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create("2022-05-10T18:57:31.2311892Z"); - Response response = await client.DateTimeBodyAsync(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_DateTimeBody_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.DateTimeBody(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_DateTimeBody_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.DateTimeBodyAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_ReturnString_ShortVersion() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.ReturnString(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_ReturnString_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.ReturnStringAsync(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_ReturnString_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.ReturnString(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_ReturnString_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.ReturnStringAsync(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_ReturnString_AllParameters() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.ReturnString(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_ReturnString_AllParameters_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.ReturnStringAsync(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_ReturnString_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.ReturnString(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_ReturnString_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.ReturnStringAsync(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_ReturnUnknown_ShortVersion() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.ReturnUnknown(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_ReturnUnknown_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.ReturnUnknownAsync(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_ReturnUnknown_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.ReturnUnknown(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_ReturnUnknown_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.ReturnUnknownAsync(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_ReturnUnknown_AllParameters() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.ReturnUnknown(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_ReturnUnknown_AllParameters_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.ReturnUnknownAsync(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_ReturnUnknown_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.ReturnUnknown(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_ReturnUnknown_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.ReturnUnknownAsync(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_RecursiveExtension_ShortVersion() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - level = 123, - }); - Response response = client.RecursiveExtension(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_RecursiveExtension_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - level = 123, - }); - Response response = await client.RecursiveExtensionAsync(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_RecursiveExtension_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Extension input = new Extension(123); - Response response = client.RecursiveExtension(input); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_RecursiveExtension_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Extension input = new Extension(123); - Response response = await client.RecursiveExtensionAsync(input); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_RecursiveExtension_AllParameters() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - level = 123, - extension = new object[] - { -null - }, - }); - Response response = client.RecursiveExtension(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_RecursiveExtension_AllParameters_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - level = 123, - extension = new object[] - { -null - }, - }); - Response response = await client.RecursiveExtensionAsync(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_RecursiveExtension_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Extension input = new Extension(123) - { - Extension = { default }, - }; - Response response = client.RecursiveExtension(input); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_RecursiveExtension_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Extension input = new Extension(123) - { - Extension = { default }, - }; - Response response = await client.RecursiveExtensionAsync(input); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_ThreeLevelRecursive_ShortVersion() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new object()); - Response response = client.ThreeLevelRecursive(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_ThreeLevelRecursive_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.ThreeLevelRecursiveAsync(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_ThreeLevelRecursive_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Extendible input = new Extendible(); - Response response = client.ThreeLevelRecursive(input); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_ThreeLevelRecursive_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Extendible input = new Extendible(); - Response response = await client.ThreeLevelRecursiveAsync(input); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_ThreeLevelRecursive_AllParameters() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - extension = new object[] - { -new -{ -level = 123, -extension = new object[] -{ -null -}, -} - }, - }); - Response response = client.ThreeLevelRecursive(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_ThreeLevelRecursive_AllParameters_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - extension = new object[] - { -new -{ -level = 123, -extension = new object[] -{ -null -}, -} - }, - }); - Response response = await client.ThreeLevelRecursiveAsync(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_ThreeLevelRecursive_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Extendible input = new Extendible - { - Extension = {new ThereLevelExtension(123) -{ -Extension = {default}, -}}, - }; - Response response = client.ThreeLevelRecursive(input); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_ThreeLevelRecursive_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Extendible input = new Extendible - { - Extension = {new ThereLevelExtension(123) -{ -Extension = {default}, -}}, - }; - Response response = await client.ThreeLevelRecursiveAsync(input); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_RecursiveModels_ShortVersion() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - parent = new object[] - { -new -{ -level = 123, -} - }, - level = 123, - }); - Response response = client.RecursiveModels(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_RecursiveModels_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - parent = new object[] - { -new -{ -level = 123, -} - }, - level = 123, - }); - Response response = await client.RecursiveModelsAsync(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_RecursiveModels_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - ChildModel input = new ChildModel(123, new BaseModel[] - { -new BaseModel(123) - }); - Response response = client.RecursiveModels(input); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_RecursiveModels_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - ChildModel input = new ChildModel(123, new BaseModel[] - { -new BaseModel(123) - }); - Response response = await client.RecursiveModelsAsync(input); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_RecursiveModels_AllParameters() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - parent = new object[] - { -new -{ -level = 123, -} - }, - level = 123, - }); - Response response = client.RecursiveModels(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_RecursiveModels_AllParameters_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - parent = new object[] - { -new -{ -level = 123, -} - }, - level = 123, - }); - Response response = await client.RecursiveModelsAsync(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_RecursiveModels_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - ChildModel input = new ChildModel(123, new BaseModel[] - { -new BaseModel(123) - }); - Response response = client.RecursiveModels(input); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_RecursiveModels_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - ChildModel input = new ChildModel(123, new BaseModel[] - { -new BaseModel(123) - }); - Response response = await client.RecursiveModelsAsync(input); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_ContainSelfModels_ShortVersion() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new { }); - Response response = client.ContainSelfModels(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_ContainSelfModels_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new { }); - Response response = await client.ContainSelfModelsAsync(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_ContainSelfModels_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - ContainSelf input = new ContainSelf(default); - Response response = client.ContainSelfModels(input); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_ContainSelfModels_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - ContainSelf input = new ContainSelf(default); - Response response = await client.ContainSelfModelsAsync(input); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_ContainSelfModels_AllParameters() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new { }); - Response response = client.ContainSelfModels(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_ContainSelfModels_AllParameters_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new { }); - Response response = await client.ContainSelfModelsAsync(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_ContainSelfModels_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - ContainSelf input = new ContainSelf(default); - Response response = client.ContainSelfModels(input); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_ContainSelfModels_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - ContainSelf input = new ContainSelf(default); - Response response = await client.ContainSelfModelsAsync(input); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_EnumParameter_ShortVersion() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.EnumParameter(1.1F); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_EnumParameter_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.EnumParameterAsync(1.1F); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_EnumParameter_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.EnumParameter(CsProjectedEnum.CsOne); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_EnumParameter_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.EnumParameterAsync(CsProjectedEnum.CsOne); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_EnumParameter_AllParameters() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.EnumParameter(1.1F); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_EnumParameter_AllParameters_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.EnumParameterAsync(1.1F); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_EnumParameter_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.EnumParameter(CsProjectedEnum.CsOne); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_EnumParameter_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.EnumParameterAsync(CsProjectedEnum.CsOne); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_BodyIsModelWithProjectedEnum_ShortVersion() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - enumProperty = 1.1F, - }); - Response response = client.BodyIsModelWithProjectedEnum(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_BodyIsModelWithProjectedEnum_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - enumProperty = 1.1F, - }); - Response response = await client.BodyIsModelWithProjectedEnumAsync(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_BodyIsModelWithProjectedEnum_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - ModelWithProjectedEnum body = new ModelWithProjectedEnum(CsProjectedEnumInModel.CsOne); - Response response = client.BodyIsModelWithProjectedEnum(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_BodyIsModelWithProjectedEnum_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - ModelWithProjectedEnum body = new ModelWithProjectedEnum(CsProjectedEnumInModel.CsOne); - Response response = await client.BodyIsModelWithProjectedEnumAsync(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_BodyIsModelWithProjectedEnum_AllParameters() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - enumProperty = 1.1F, - }); - Response response = client.BodyIsModelWithProjectedEnum(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_BodyIsModelWithProjectedEnum_AllParameters_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - enumProperty = 1.1F, - }); - Response response = await client.BodyIsModelWithProjectedEnumAsync(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_BodyIsModelWithProjectedEnum_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - ModelWithProjectedEnum body = new ModelWithProjectedEnum(CsProjectedEnumInModel.CsOne); - Response response = client.BodyIsModelWithProjectedEnum(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_BodyIsModelWithProjectedEnum_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - ModelWithProjectedEnum body = new ModelWithProjectedEnum(CsProjectedEnumInModel.CsOne); - Response response = await client.BodyIsModelWithProjectedEnumAsync(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_OptionalDictionary_ShortVersion() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = null; - Response response = client.OptionalDictionary(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_OptionalDictionary_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = null; - Response response = await client.OptionalDictionaryAsync(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_OptionalDictionary_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.OptionalDictionary(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_OptionalDictionary_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.OptionalDictionaryAsync(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_OptionalDictionary_AllParameters() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - key = 1234, - }); - Response response = client.OptionalDictionary(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_OptionalDictionary_AllParameters_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - key = 1234, - }); - Response response = await client.OptionalDictionaryAsync(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_OptionalDictionary_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.OptionalDictionary(body: new Dictionary - { - ["key"] = 1234 - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_OptionalDictionary_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.OptionalDictionaryAsync(body: new Dictionary - { - ["key"] = 1234 - }); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_AzureLocationOp_ShortVersion() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = null; - Response response = client.AzureLocationOp(new AzureLocation(""), new AzureLocation(""), content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_AzureLocationOp_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = null; - Response response = await client.AzureLocationOpAsync(new AzureLocation(""), new AzureLocation(""), content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_AzureLocationOp_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = client.AzureLocationOp(new AzureLocation(""), new AzureLocation("")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_AzureLocationOp_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - Response response = await client.AzureLocationOpAsync(new AzureLocation(""), new AzureLocation("")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_AzureLocationOp_AllParameters() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - location = "", - }); - Response response = client.AzureLocationOp(new AzureLocation(""), new AzureLocation(""), content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_AzureLocationOp_AllParameters_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - using RequestContent content = RequestContent.Create(new - { - location = "", - }); - Response response = await client.AzureLocationOpAsync(new AzureLocation(""), new AzureLocation(""), content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_AzureLocationOp_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - AzureLocationModel body = new AzureLocationModel(new AzureLocation("")); - Response response = client.AzureLocationOp(new AzureLocation(""), new AzureLocation(""), body: body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_AzureLocationOp_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - - AzureLocationModel body = new AzureLocationModel(new AzureLocation("")); - Response response = await client.AzureLocationOpAsync(new AzureLocation(""), new AzureLocation(""), body: body); + Response response = await client.TopActionAsync(default); } } } diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_Glossary.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_Glossary.cs deleted file mode 100644 index 0a7fc9c402a..00000000000 --- a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_Glossary.cs +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading.Tasks; -using Azure; -using Azure.Identity; -using FirstTestTypeSpec.Models; -using NUnit.Framework; - -namespace FirstTestTypeSpec.Samples -{ - public partial class Samples_Glossary - { - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_DoSomething_ShortVersion() - { - Uri endpoint = new Uri(""); - Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); - - Response response = client.DoSomething("", "

", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_DoSomething_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); - - Response response = await client.DoSomethingAsync("", "

", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_DoSomething_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); - - Response response = client.DoSomething("", "

"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_DoSomething_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); - - Response response = await client.DoSomethingAsync("", "

"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_DoSomething_AllParameters() - { - Uri endpoint = new Uri(""); - Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); - - Response response = client.DoSomething("", "

", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_DoSomething_AllParameters_Async() - { - Uri endpoint = new Uri(""); - Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); - - Response response = await client.DoSomethingAsync("", "

", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Glossary_DoSomething_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); - - Response response = client.DoSomething("", "

"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Glossary_DoSomething_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); - - Response response = await client.DoSomethingAsync("", "

"); - } - } -} diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_HelloDemo.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_HelloDemo.cs deleted file mode 100644 index 4c79c5a8e76..00000000000 --- a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_HelloDemo.cs +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading.Tasks; -using Azure; -using Azure.Identity; -using NUnit.Framework; - -namespace FirstTestTypeSpec.Samples -{ - public partial class Samples_HelloDemo - { - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Demo_SayHi_ShortVersion() - { - Uri endpoint = new Uri(""); - HelloDemo client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemoClient(); - - Response response = client.SayHi("", "", null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Demo_SayHi_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - HelloDemo client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemoClient(); - - Response response = await client.SayHiAsync("", "", null, null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Demo_SayHi_AllParameters() - { - Uri endpoint = new Uri(""); - HelloDemo client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemoClient(); - - Response response = client.SayHi("", "", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Demo_SayHi_AllParameters_Async() - { - Uri endpoint = new Uri(""); - HelloDemo client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemoClient(); - - Response response = await client.SayHiAsync("", "", "", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); - } - } -} diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_HelloDemo2.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_HelloDemo2.cs deleted file mode 100644 index 12548ed58fb..00000000000 --- a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_HelloDemo2.cs +++ /dev/null @@ -1,1524 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Identity; -using FirstTestTypeSpec.Models; -using NUnit.Framework; - -namespace FirstTestTypeSpec.Samples -{ - public partial class Samples_HelloDemo2 - { - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Demo2_HelloAgain_ShortVersion() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - using RequestContent content = RequestContent.Create(new - { - requiredString = "", - requiredInt = 1234, - requiredCollection = new object[] - { -"1" - }, - requiredDictionary = new - { - key = "1", - }, - requiredModel = new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - requiredBadDescription = "", - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - }, - requiredUnknown = new object(), - requiredRecordUnknown = new - { - key = new object(), - }, - modelWithRequiredNullable = new - { - requiredNullablePrimitive = 1234, - requiredExtensibleEnum = "1", - requiredFixedEnum = "1", - }, - unionList = new object[] - { -"" - }, - }); - Response response = client.HelloAgain("", "", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("requiredString").ToString()); - Console.WriteLine(result.GetProperty("requiredInt").ToString()); - Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); - Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); - Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); - Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); - Console.WriteLine(result.GetProperty("unionList")[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Demo2_HelloAgain_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - using RequestContent content = RequestContent.Create(new - { - requiredString = "", - requiredInt = 1234, - requiredCollection = new object[] - { -"1" - }, - requiredDictionary = new - { - key = "1", - }, - requiredModel = new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - requiredBadDescription = "", - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - }, - requiredUnknown = new object(), - requiredRecordUnknown = new - { - key = new object(), - }, - modelWithRequiredNullable = new - { - requiredNullablePrimitive = 1234, - requiredExtensibleEnum = "1", - requiredFixedEnum = "1", - }, - unionList = new object[] - { -"" - }, - }); - Response response = await client.HelloAgainAsync("", "", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("requiredString").ToString()); - Console.WriteLine(result.GetProperty("requiredInt").ToString()); - Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); - Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); - Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); - Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); - Console.WriteLine(result.GetProperty("unionList")[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Demo2_HelloAgain_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - RoundTripModel action = new RoundTripModel( - "", - 1234, - new StringFixedEnum[] { StringFixedEnum.One }, - new Dictionary - { - ["key"] = StringExtensibleEnum.One - }, - new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default), - BinaryData.FromObjectAsJson(new object()), - new Dictionary - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - new ModelWithRequiredNullableProperties(1234, StringExtensibleEnum.One, StringFixedEnum.One), - new BinaryData[] - { -BinaryData.FromObjectAsJson("") - }); - Response response = client.HelloAgain("", "", action); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Demo2_HelloAgain_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - RoundTripModel action = new RoundTripModel( - "", - 1234, - new StringFixedEnum[] { StringFixedEnum.One }, - new Dictionary - { - ["key"] = StringExtensibleEnum.One - }, - new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default), - BinaryData.FromObjectAsJson(new object()), - new Dictionary - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - new ModelWithRequiredNullableProperties(1234, StringExtensibleEnum.One, StringFixedEnum.One), - new BinaryData[] - { -BinaryData.FromObjectAsJson("") - }); - Response response = await client.HelloAgainAsync("", "", action); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Demo2_HelloAgain_AllParameters() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - using RequestContent content = RequestContent.Create(new - { - requiredString = "", - requiredInt = 1234, - requiredCollection = new object[] - { -"1" - }, - requiredDictionary = new - { - key = "1", - }, - requiredModel = new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - optionalLiteralString = "reject", - optionalLiteralInt = 456, - optionalLiteralFloat = 4.56F, - optionalLiteralBool = true, - requiredBadDescription = "", - optionalNullableList = new object[] - { -1234 - }, - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - optionalFloatProperty = new object(), - optionalResourceId = "", - }, - intExtensibleEnum = 1, - intExtensibleEnumCollection = new object[] - { -1 - }, - floatExtensibleEnum = 1F, - floatExtensibleEnumCollection = new object[] - { -1F - }, - floatFixedEnum = 1.1F, - floatFixedEnumCollection = new object[] - { -1.1F - }, - intFixedEnum = 1, - intFixedEnumCollection = new object[] - { -1 - }, - stringFixedEnum = "1", - requiredUnknown = new object(), - optionalUnknown = new object(), - requiredRecordUnknown = new - { - key = new object(), - }, - optionalRecordUnknown = new - { - key = new object(), - }, - modelWithRequiredNullable = new - { - requiredNullablePrimitive = 1234, - requiredExtensibleEnum = "1", - requiredFixedEnum = "1", - }, - unionList = new object[] - { -"" - }, - }); - Response response = client.HelloAgain("", "", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("requiredString").ToString()); - Console.WriteLine(result.GetProperty("requiredInt").ToString()); - Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalResourceId").ToString()); - Console.WriteLine(result.GetProperty("intExtensibleEnum").ToString()); - Console.WriteLine(result.GetProperty("intExtensibleEnumCollection")[0].ToString()); - Console.WriteLine(result.GetProperty("floatExtensibleEnum").ToString()); - Console.WriteLine(result.GetProperty("floatExtensibleEnumCollection")[0].ToString()); - Console.WriteLine(result.GetProperty("floatFixedEnum").ToString()); - Console.WriteLine(result.GetProperty("floatFixedEnumCollection")[0].ToString()); - Console.WriteLine(result.GetProperty("intFixedEnum").ToString()); - Console.WriteLine(result.GetProperty("intFixedEnumCollection")[0].ToString()); - Console.WriteLine(result.GetProperty("stringFixedEnum").ToString()); - Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); - Console.WriteLine(result.GetProperty("optionalUnknown").ToString()); - Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("optionalRecordUnknown").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("readOnlyOptionalRecordUnknown").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); - Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); - Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); - Console.WriteLine(result.GetProperty("unionList")[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Demo2_HelloAgain_AllParameters_Async() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - using RequestContent content = RequestContent.Create(new - { - requiredString = "", - requiredInt = 1234, - requiredCollection = new object[] - { -"1" - }, - requiredDictionary = new - { - key = "1", - }, - requiredModel = new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - optionalLiteralString = "reject", - optionalLiteralInt = 456, - optionalLiteralFloat = 4.56F, - optionalLiteralBool = true, - requiredBadDescription = "", - optionalNullableList = new object[] - { -1234 - }, - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - optionalFloatProperty = new object(), - optionalResourceId = "", - }, - intExtensibleEnum = 1, - intExtensibleEnumCollection = new object[] - { -1 - }, - floatExtensibleEnum = 1F, - floatExtensibleEnumCollection = new object[] - { -1F - }, - floatFixedEnum = 1.1F, - floatFixedEnumCollection = new object[] - { -1.1F - }, - intFixedEnum = 1, - intFixedEnumCollection = new object[] - { -1 - }, - stringFixedEnum = "1", - requiredUnknown = new object(), - optionalUnknown = new object(), - requiredRecordUnknown = new - { - key = new object(), - }, - optionalRecordUnknown = new - { - key = new object(), - }, - modelWithRequiredNullable = new - { - requiredNullablePrimitive = 1234, - requiredExtensibleEnum = "1", - requiredFixedEnum = "1", - }, - unionList = new object[] - { -"" - }, - }); - Response response = await client.HelloAgainAsync("", "", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("requiredString").ToString()); - Console.WriteLine(result.GetProperty("requiredInt").ToString()); - Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalResourceId").ToString()); - Console.WriteLine(result.GetProperty("intExtensibleEnum").ToString()); - Console.WriteLine(result.GetProperty("intExtensibleEnumCollection")[0].ToString()); - Console.WriteLine(result.GetProperty("floatExtensibleEnum").ToString()); - Console.WriteLine(result.GetProperty("floatExtensibleEnumCollection")[0].ToString()); - Console.WriteLine(result.GetProperty("floatFixedEnum").ToString()); - Console.WriteLine(result.GetProperty("floatFixedEnumCollection")[0].ToString()); - Console.WriteLine(result.GetProperty("intFixedEnum").ToString()); - Console.WriteLine(result.GetProperty("intFixedEnumCollection")[0].ToString()); - Console.WriteLine(result.GetProperty("stringFixedEnum").ToString()); - Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); - Console.WriteLine(result.GetProperty("optionalUnknown").ToString()); - Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("optionalRecordUnknown").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("readOnlyOptionalRecordUnknown").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); - Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); - Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); - Console.WriteLine(result.GetProperty("unionList")[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Demo2_HelloAgain_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - RoundTripModel action = new RoundTripModel( - "", - 1234, - new StringFixedEnum[] { StringFixedEnum.One }, - new Dictionary - { - ["key"] = StringExtensibleEnum.One - }, - new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default) - { - OptionalLiteralString = ThingOptionalLiteralString.Reject, - OptionalLiteralInt = ThingOptionalLiteralInt._456, - OptionalLiteralFloat = ThingOptionalLiteralFloat._456, - OptionalLiteralBool = true, - OptionalNullableList = { 1234 }, - OptionalFloatProperty = (double)default, - OptionalResourceId = new ResourceIdentifier(""), - }, - BinaryData.FromObjectAsJson(new object()), - new Dictionary - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - new ModelWithRequiredNullableProperties(1234, StringExtensibleEnum.One, StringFixedEnum.One), - new BinaryData[] - { -BinaryData.FromObjectAsJson("") - }) - { - IntExtensibleEnum = IntExtensibleEnum.One, - IntExtensibleEnumCollection = { IntExtensibleEnum.One }, - FloatExtensibleEnum = FloatExtensibleEnum.One, - FloatExtensibleEnumCollection = { FloatExtensibleEnum.One }, - FloatFixedEnum = FloatFixedEnum.One, - FloatFixedEnumCollection = { FloatFixedEnum.One }, - IntFixedEnum = IntFixedEnum.One, - IntFixedEnumCollection = { IntFixedEnum.One }, - StringFixedEnum = StringFixedEnum.One, - OptionalUnknown = BinaryData.FromObjectAsJson(new object()), - OptionalRecordUnknown = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, - }; - Response response = client.HelloAgain("", "", action); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Demo2_HelloAgain_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - RoundTripModel action = new RoundTripModel( - "", - 1234, - new StringFixedEnum[] { StringFixedEnum.One }, - new Dictionary - { - ["key"] = StringExtensibleEnum.One - }, - new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default) - { - OptionalLiteralString = ThingOptionalLiteralString.Reject, - OptionalLiteralInt = ThingOptionalLiteralInt._456, - OptionalLiteralFloat = ThingOptionalLiteralFloat._456, - OptionalLiteralBool = true, - OptionalNullableList = { 1234 }, - OptionalFloatProperty = (double)default, - OptionalResourceId = new ResourceIdentifier(""), - }, - BinaryData.FromObjectAsJson(new object()), - new Dictionary - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - new ModelWithRequiredNullableProperties(1234, StringExtensibleEnum.One, StringFixedEnum.One), - new BinaryData[] - { -BinaryData.FromObjectAsJson("") - }) - { - IntExtensibleEnum = IntExtensibleEnum.One, - IntExtensibleEnumCollection = { IntExtensibleEnum.One }, - FloatExtensibleEnum = FloatExtensibleEnum.One, - FloatExtensibleEnumCollection = { FloatExtensibleEnum.One }, - FloatFixedEnum = FloatFixedEnum.One, - FloatFixedEnumCollection = { FloatFixedEnum.One }, - IntFixedEnum = IntFixedEnum.One, - IntFixedEnumCollection = { IntFixedEnum.One }, - StringFixedEnum = StringFixedEnum.One, - OptionalUnknown = BinaryData.FromObjectAsJson(new object()), - OptionalRecordUnknown = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, - }; - Response response = await client.HelloAgainAsync("", "", action); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Demo2_NoContentType_ShortVersion() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - using RequestContent content = RequestContent.Create(new - { - requiredString = "", - requiredInt = 1234, - requiredCollection = new object[] - { -"1" - }, - requiredDictionary = new - { - key = "1", - }, - requiredModel = new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - requiredBadDescription = "", - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - }, - requiredUnknown = new object(), - requiredRecordUnknown = new - { - key = new object(), - }, - modelWithRequiredNullable = new - { - requiredNullablePrimitive = 1234, - requiredExtensibleEnum = "1", - requiredFixedEnum = "1", - }, - unionList = new object[] - { -"" - }, - }); - Response response = client.NoContentType("", "", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("requiredString").ToString()); - Console.WriteLine(result.GetProperty("requiredInt").ToString()); - Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); - Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); - Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); - Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); - Console.WriteLine(result.GetProperty("unionList")[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Demo2_NoContentType_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - using RequestContent content = RequestContent.Create(new - { - requiredString = "", - requiredInt = 1234, - requiredCollection = new object[] - { -"1" - }, - requiredDictionary = new - { - key = "1", - }, - requiredModel = new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - requiredBadDescription = "", - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - }, - requiredUnknown = new object(), - requiredRecordUnknown = new - { - key = new object(), - }, - modelWithRequiredNullable = new - { - requiredNullablePrimitive = 1234, - requiredExtensibleEnum = "1", - requiredFixedEnum = "1", - }, - unionList = new object[] - { -"" - }, - }); - Response response = await client.NoContentTypeAsync("", "", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("requiredString").ToString()); - Console.WriteLine(result.GetProperty("requiredInt").ToString()); - Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); - Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); - Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); - Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); - Console.WriteLine(result.GetProperty("unionList")[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Demo2_NoContentType_AllParameters() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - using RequestContent content = RequestContent.Create(new - { - requiredString = "", - requiredInt = 1234, - requiredCollection = new object[] - { -"1" - }, - requiredDictionary = new - { - key = "1", - }, - requiredModel = new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - optionalLiteralString = "reject", - optionalLiteralInt = 456, - optionalLiteralFloat = 4.56F, - optionalLiteralBool = true, - requiredBadDescription = "", - optionalNullableList = new object[] - { -1234 - }, - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - optionalFloatProperty = new object(), - optionalResourceId = "", - }, - intExtensibleEnum = 1, - intExtensibleEnumCollection = new object[] - { -1 - }, - floatExtensibleEnum = 1F, - floatExtensibleEnumCollection = new object[] - { -1F - }, - floatFixedEnum = 1.1F, - floatFixedEnumCollection = new object[] - { -1.1F - }, - intFixedEnum = 1, - intFixedEnumCollection = new object[] - { -1 - }, - stringFixedEnum = "1", - requiredUnknown = new object(), - optionalUnknown = new object(), - requiredRecordUnknown = new - { - key = new object(), - }, - optionalRecordUnknown = new - { - key = new object(), - }, - modelWithRequiredNullable = new - { - requiredNullablePrimitive = 1234, - requiredExtensibleEnum = "1", - requiredFixedEnum = "1", - }, - unionList = new object[] - { -"" - }, - }); - Response response = client.NoContentType("", "", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("requiredString").ToString()); - Console.WriteLine(result.GetProperty("requiredInt").ToString()); - Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalResourceId").ToString()); - Console.WriteLine(result.GetProperty("intExtensibleEnum").ToString()); - Console.WriteLine(result.GetProperty("intExtensibleEnumCollection")[0].ToString()); - Console.WriteLine(result.GetProperty("floatExtensibleEnum").ToString()); - Console.WriteLine(result.GetProperty("floatExtensibleEnumCollection")[0].ToString()); - Console.WriteLine(result.GetProperty("floatFixedEnum").ToString()); - Console.WriteLine(result.GetProperty("floatFixedEnumCollection")[0].ToString()); - Console.WriteLine(result.GetProperty("intFixedEnum").ToString()); - Console.WriteLine(result.GetProperty("intFixedEnumCollection")[0].ToString()); - Console.WriteLine(result.GetProperty("stringFixedEnum").ToString()); - Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); - Console.WriteLine(result.GetProperty("optionalUnknown").ToString()); - Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("optionalRecordUnknown").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("readOnlyOptionalRecordUnknown").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); - Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); - Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); - Console.WriteLine(result.GetProperty("unionList")[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Demo2_NoContentType_AllParameters_Async() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - using RequestContent content = RequestContent.Create(new - { - requiredString = "", - requiredInt = 1234, - requiredCollection = new object[] - { -"1" - }, - requiredDictionary = new - { - key = "1", - }, - requiredModel = new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - optionalLiteralString = "reject", - optionalLiteralInt = 456, - optionalLiteralFloat = 4.56F, - optionalLiteralBool = true, - requiredBadDescription = "", - optionalNullableList = new object[] - { -1234 - }, - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - optionalFloatProperty = new object(), - optionalResourceId = "", - }, - intExtensibleEnum = 1, - intExtensibleEnumCollection = new object[] - { -1 - }, - floatExtensibleEnum = 1F, - floatExtensibleEnumCollection = new object[] - { -1F - }, - floatFixedEnum = 1.1F, - floatFixedEnumCollection = new object[] - { -1.1F - }, - intFixedEnum = 1, - intFixedEnumCollection = new object[] - { -1 - }, - stringFixedEnum = "1", - requiredUnknown = new object(), - optionalUnknown = new object(), - requiredRecordUnknown = new - { - key = new object(), - }, - optionalRecordUnknown = new - { - key = new object(), - }, - modelWithRequiredNullable = new - { - requiredNullablePrimitive = 1234, - requiredExtensibleEnum = "1", - requiredFixedEnum = "1", - }, - unionList = new object[] - { -"" - }, - }); - Response response = await client.NoContentTypeAsync("", "", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("requiredString").ToString()); - Console.WriteLine(result.GetProperty("requiredInt").ToString()); - Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalResourceId").ToString()); - Console.WriteLine(result.GetProperty("intExtensibleEnum").ToString()); - Console.WriteLine(result.GetProperty("intExtensibleEnumCollection")[0].ToString()); - Console.WriteLine(result.GetProperty("floatExtensibleEnum").ToString()); - Console.WriteLine(result.GetProperty("floatExtensibleEnumCollection")[0].ToString()); - Console.WriteLine(result.GetProperty("floatFixedEnum").ToString()); - Console.WriteLine(result.GetProperty("floatFixedEnumCollection")[0].ToString()); - Console.WriteLine(result.GetProperty("intFixedEnum").ToString()); - Console.WriteLine(result.GetProperty("intFixedEnumCollection")[0].ToString()); - Console.WriteLine(result.GetProperty("stringFixedEnum").ToString()); - Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); - Console.WriteLine(result.GetProperty("optionalUnknown").ToString()); - Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("optionalRecordUnknown").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("readOnlyOptionalRecordUnknown").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); - Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); - Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); - Console.WriteLine(result.GetProperty("unionList")[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Demo2_HelloDemoAgain_ShortVersion() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - Response response = client.HelloDemoAgain(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Demo2_HelloDemoAgain_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - Response response = await client.HelloDemoAgainAsync(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Demo2_HelloDemoAgain_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - Response response = client.HelloDemoAgain(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Demo2_HelloDemoAgain_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - Response response = await client.HelloDemoAgainAsync(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Demo2_HelloDemoAgain_AllParameters() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - Response response = client.HelloDemoAgain(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Demo2_HelloDemoAgain_AllParameters_Async() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - Response response = await client.HelloDemoAgainAsync(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Demo2_HelloDemoAgain_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - Response response = client.HelloDemoAgain(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Demo2_HelloDemoAgain_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - Response response = await client.HelloDemoAgainAsync(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Demo2_CreateLiteral_ShortVersion() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - using RequestContent content = RequestContent.Create(new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - requiredBadDescription = "", - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - }); - Response response = client.CreateLiteral(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Demo2_CreateLiteral_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - using RequestContent content = RequestContent.Create(new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - requiredBadDescription = "", - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - }); - Response response = await client.CreateLiteralAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Demo2_CreateLiteral_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - Thing body = new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default); - Response response = client.CreateLiteral(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Demo2_CreateLiteral_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - Thing body = new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default); - Response response = await client.CreateLiteralAsync(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Demo2_CreateLiteral_AllParameters() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - using RequestContent content = RequestContent.Create(new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - optionalLiteralString = "reject", - optionalLiteralInt = 456, - optionalLiteralFloat = 4.56F, - optionalLiteralBool = true, - requiredBadDescription = "", - optionalNullableList = new object[] - { -1234 - }, - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - optionalFloatProperty = new object(), - optionalResourceId = "", - }); - Response response = client.CreateLiteral(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Demo2_CreateLiteral_AllParameters_Async() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - using RequestContent content = RequestContent.Create(new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - optionalLiteralString = "reject", - optionalLiteralInt = 456, - optionalLiteralFloat = 4.56F, - optionalLiteralBool = true, - requiredBadDescription = "", - optionalNullableList = new object[] - { -1234 - }, - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - optionalFloatProperty = new object(), - optionalResourceId = "", - }); - Response response = await client.CreateLiteralAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Demo2_CreateLiteral_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - Thing body = new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default) - { - OptionalLiteralString = ThingOptionalLiteralString.Reject, - OptionalLiteralInt = ThingOptionalLiteralInt._456, - OptionalLiteralFloat = ThingOptionalLiteralFloat._456, - OptionalLiteralBool = true, - OptionalNullableList = { 1234 }, - OptionalFloatProperty = (double)default, - OptionalResourceId = new ResourceIdentifier(""), - }; - Response response = client.CreateLiteral(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Demo2_CreateLiteral_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - Thing body = new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default) - { - OptionalLiteralString = ThingOptionalLiteralString.Reject, - OptionalLiteralInt = ThingOptionalLiteralInt._456, - OptionalLiteralFloat = ThingOptionalLiteralFloat._456, - OptionalLiteralBool = true, - OptionalNullableList = { 1234 }, - OptionalFloatProperty = (double)default, - OptionalResourceId = new ResourceIdentifier(""), - }; - Response response = await client.CreateLiteralAsync(body); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Demo2_HelloLiteral_ShortVersion() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - Response response = client.HelloLiteral(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Demo2_HelloLiteral_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - Response response = await client.HelloLiteralAsync(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Demo2_HelloLiteral_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - Response response = client.HelloLiteral(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Demo2_HelloLiteral_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - Response response = await client.HelloLiteralAsync(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Demo2_HelloLiteral_AllParameters() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - Response response = client.HelloLiteral(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Demo2_HelloLiteral_AllParameters_Async() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - Response response = await client.HelloLiteralAsync(null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("name").ToString()); - Console.WriteLine(result.GetProperty("requiredUnion").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); - Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); - Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); - Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); - Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); - Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Demo2_HelloLiteral_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - Response response = client.HelloLiteral(); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Demo2_HelloLiteral_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); - - Response response = await client.HelloLiteralAsync(); - } - } -} diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/EntityTests.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/EntityTests.cs deleted file mode 100644 index c7b1a5d25b3..00000000000 --- a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/EntityTests.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure; -using Azure.Identity; -using FirstTestTypeSpec.Models; -using NUnit.Framework; - -namespace FirstTestTypeSpec.Tests -{ - public partial class EntityTests : FirstTestTypeSpecTestBase - { - public EntityTests(bool isAsync) : base(isAsync) - { - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task Entity_DoSomething_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - Entity client = CreateFirstTestTypeSpecClient(endpoint, credential).GetEntityClient(); - - Response response = await client.DoSomethingAsync("", null); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task Entity_DoSomething_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - Entity client = CreateFirstTestTypeSpecClient(endpoint, credential).GetEntityClient(); - - Response response = await client.DoSomethingAsync(""); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task Entity_DoSomething_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - Entity client = CreateFirstTestTypeSpecClient(endpoint, credential).GetEntityClient(); - - Response response = await client.DoSomethingAsync("", null); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task Entity_DoSomething_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - Entity client = CreateFirstTestTypeSpecClient(endpoint, credential).GetEntityClient(); - - Response response = await client.DoSomethingAsync(""); - } - } -} diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/EnumTestTests.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/EnumTestTests.cs deleted file mode 100644 index cf16932ec5a..00000000000 --- a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/EnumTestTests.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Identity; -using NUnit.Framework; - -namespace FirstTestTypeSpec.Tests -{ - public partial class EnumTestTests : FirstTestTypeSpecTestBase - { - public EnumTestTests(bool isAsync) : base(isAsync) - { - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task EnumTest_CreateUnknownValue_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - EnumTest client = CreateFirstTestTypeSpecClient(endpoint, credential).GetEnumTestClient(); - - using RequestContent content = RequestContent.Create("Monday"); - Response response = await client.CreateUnknownValueAsync(content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task EnumTest_CreateUnknownValue_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - EnumTest client = CreateFirstTestTypeSpecClient(endpoint, credential).GetEnumTestClient(); - - using RequestContent content = RequestContent.Create("Monday"); - Response response = await client.CreateUnknownValueAsync(content); - } - } -} diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/FirstTestTypeSpecClientTests.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/FirstTestTypeSpecClientTests.cs index 0117c72bfa1..a0dbabdb930 100644 --- a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/FirstTestTypeSpecClientTests.cs +++ b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/FirstTestTypeSpecClientTests.cs @@ -6,10 +6,8 @@ #nullable disable using System; -using System.Collections.Generic; using System.Threading.Tasks; using Azure; -using Azure.Core; using Azure.Identity; using FirstTestTypeSpec.Models; using NUnit.Framework; @@ -24,1138 +22,24 @@ public FirstTestTypeSpecClientTests(bool isAsync) : base(isAsync) [Test] [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_TopAction_ShortVersion() + public async Task FirstTestTypeSpec_TopAction_ForTestTopAction() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = null; FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - Response response = await client.TopActionAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); + Response response = await client.TopActionAsync(default, null); } [Test] [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_TopAction_ShortVersion_Convenience() + public async Task FirstTestTypeSpec_TopAction_ForTestTopAction_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = null; FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - Response response = await client.TopActionAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_TopAction_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.TopActionAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_TopAction_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.TopActionAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_TopAction2_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.TopAction2Async(null); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_TopAction2_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.TopAction2Async(null); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_PatchAction_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - requiredBadDescription = "", - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - }); - Response response = await client.PatchActionAsync(content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_PatchAction_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - optionalLiteralString = "reject", - optionalLiteralInt = 456, - optionalLiteralFloat = 4.56F, - optionalLiteralBool = true, - requiredBadDescription = "", - optionalNullableList = new object[] - { -1234 - }, - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - optionalFloatProperty = new object(), - optionalResourceId = "", - }); - Response response = await client.PatchActionAsync(content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_AnonymousBody_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - requiredBadDescription = "", - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - }); - Response response = await client.AnonymousBodyAsync(content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_AnonymousBody_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.AnonymousBodyAsync("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default, AnonymousBodyRequestRequiredLiteralString.Accept, AnonymousBodyRequestRequiredLiteralInt._123, AnonymousBodyRequestRequiredLiteralFloat._123, false); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_AnonymousBody_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - optionalLiteralString = "reject", - optionalLiteralInt = 456, - optionalLiteralFloat = 4.56F, - optionalLiteralBool = true, - requiredBadDescription = "", - optionalNullableList = new object[] - { -1234 - }, - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - optionalFloatProperty = new object(), - optionalResourceId = "", - }); - Response response = await client.AnonymousBodyAsync(content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_AnonymousBody_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.AnonymousBodyAsync("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default, AnonymousBodyRequestRequiredLiteralString.Accept, AnonymousBodyRequestRequiredLiteralInt._123, AnonymousBodyRequestRequiredLiteralFloat._123, false, optionalLiteralString: AnonymousBodyRequestOptionalLiteralString.Reject, optionalLiteralInt: AnonymousBodyRequestOptionalLiteralInt._456, optionalLiteralFloat: AnonymousBodyRequestOptionalLiteralFloat._456, optionalLiteralBool: true, optionalNullableList: new int[] { 1234 }, optionalFloatProperty: (double)default, optionalResourceId: new ResourceIdentifier("")); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_FriendlyModel_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - name = "", - }); - Response response = await client.FriendlyModelAsync(content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_FriendlyModel_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.FriendlyModelAsync(""); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_FriendlyModel_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - name = "", - }); - Response response = await client.FriendlyModelAsync(content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_FriendlyModel_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.FriendlyModelAsync(""); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_AddTimeHeader_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.AddTimeHeaderAsync(); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_AddTimeHeader_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.AddTimeHeaderAsync(); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_StringFormat_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - sourceUrl = "http://localhost:3000", - guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - }); - Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_StringFormat_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); - Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_StringFormat_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - sourceUrl = "http://localhost:3000", - guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", - }); - Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_StringFormat_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); - Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_ProjectedNameModel_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - name = "", - }); - Response response = await client.ProjectedNameModelAsync(content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_ProjectedNameModel_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.ProjectedNameModelAsync(""); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_ProjectedNameModel_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - name = "", - }); - Response response = await client.ProjectedNameModelAsync(content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_ProjectedNameModel_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.ProjectedNameModelAsync(""); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_ReturnsAnonymousModel_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.ReturnsAnonymousModelAsync(null); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_ReturnsAnonymousModel_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.ReturnsAnonymousModelAsync(); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_ReturnsAnonymousModel_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.ReturnsAnonymousModelAsync(null); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_ReturnsAnonymousModel_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.ReturnsAnonymousModelAsync(); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_HeadAsBoolean_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.HeadAsBooleanAsync(""); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_HeadAsBoolean_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.HeadAsBooleanAsync(""); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_StringBody_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(""); - Response response = await client.StringBodyAsync(content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_StringBody_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.StringBodyAsync(""); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_StringBody_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(""); - Response response = await client.StringBodyAsync(content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_StringBody_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.StringBodyAsync(""); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_BoolBody_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(true); - Response response = await client.BoolBodyAsync(content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_BoolBody_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.BoolBodyAsync(true); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_BoolBody_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(true); - Response response = await client.BoolBodyAsync(content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_BoolBody_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.BoolBodyAsync(true); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_DateTimeBody_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = RequestContent.Create("2022-05-10T18:57:31.2311892Z"); - Response response = await client.DateTimeBodyAsync(content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_DateTimeBody_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.DateTimeBodyAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_DateTimeBody_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = RequestContent.Create("2022-05-10T18:57:31.2311892Z"); - Response response = await client.DateTimeBodyAsync(content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_DateTimeBody_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.DateTimeBodyAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_ReturnString_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.ReturnStringAsync(null); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_ReturnString_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.ReturnStringAsync(); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_ReturnString_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.ReturnStringAsync(null); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_ReturnString_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.ReturnStringAsync(); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_ReturnUnknown_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.ReturnUnknownAsync(null); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_ReturnUnknown_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.ReturnUnknownAsync(); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_ReturnUnknown_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.ReturnUnknownAsync(null); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_ReturnUnknown_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.ReturnUnknownAsync(); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_RecursiveExtension_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - level = 123, - }); - Response response = await client.RecursiveExtensionAsync(content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_RecursiveExtension_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Extension input = new Extension(123); - Response response = await client.RecursiveExtensionAsync(input); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_RecursiveExtension_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - level = 123, - extension = new object[] - { -null - }, - }); - Response response = await client.RecursiveExtensionAsync(content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_RecursiveExtension_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Extension input = new Extension(123) - { - Extension = { default }, - }; - Response response = await client.RecursiveExtensionAsync(input); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_ThreeLevelRecursive_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.ThreeLevelRecursiveAsync(content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_ThreeLevelRecursive_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Extendible input = new Extendible(); - Response response = await client.ThreeLevelRecursiveAsync(input); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_ThreeLevelRecursive_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - extension = new object[] - { -new -{ -level = 123, -extension = new object[] -{ -null -}, -} - }, - }); - Response response = await client.ThreeLevelRecursiveAsync(content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_ThreeLevelRecursive_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Extendible input = new Extendible - { - Extension = {new ThereLevelExtension(123) -{ -Extension = {default}, -}}, - }; - Response response = await client.ThreeLevelRecursiveAsync(input); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_RecursiveModels_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - parent = new object[] - { -new -{ -level = 123, -} - }, - level = 123, - }); - Response response = await client.RecursiveModelsAsync(content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_RecursiveModels_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - ChildModel input = new ChildModel(123, new BaseModel[] - { -new BaseModel(123) - }); - Response response = await client.RecursiveModelsAsync(input); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_RecursiveModels_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - parent = new object[] - { -new -{ -level = 123, -} - }, - level = 123, - }); - Response response = await client.RecursiveModelsAsync(content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_RecursiveModels_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - ChildModel input = new ChildModel(123, new BaseModel[] - { -new BaseModel(123) - }); - Response response = await client.RecursiveModelsAsync(input); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_ContainSelfModels_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new { }); - Response response = await client.ContainSelfModelsAsync(content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_ContainSelfModels_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - ContainSelf input = new ContainSelf(default); - Response response = await client.ContainSelfModelsAsync(input); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_ContainSelfModels_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new { }); - Response response = await client.ContainSelfModelsAsync(content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_ContainSelfModels_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - ContainSelf input = new ContainSelf(default); - Response response = await client.ContainSelfModelsAsync(input); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_EnumParameter_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.EnumParameterAsync(1.1F); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_EnumParameter_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.EnumParameterAsync(CsProjectedEnum.CsOne); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_EnumParameter_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.EnumParameterAsync(1.1F); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_EnumParameter_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.EnumParameterAsync(CsProjectedEnum.CsOne); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_BodyIsModelWithProjectedEnum_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - enumProperty = 1.1F, - }); - Response response = await client.BodyIsModelWithProjectedEnumAsync(content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_BodyIsModelWithProjectedEnum_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - ModelWithProjectedEnum body = new ModelWithProjectedEnum(CsProjectedEnumInModel.CsOne); - Response response = await client.BodyIsModelWithProjectedEnumAsync(body); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_BodyIsModelWithProjectedEnum_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - enumProperty = 1.1F, - }); - Response response = await client.BodyIsModelWithProjectedEnumAsync(content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_BodyIsModelWithProjectedEnum_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - ModelWithProjectedEnum body = new ModelWithProjectedEnum(CsProjectedEnumInModel.CsOne); - Response response = await client.BodyIsModelWithProjectedEnumAsync(body); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_OptionalDictionary_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = null; - Response response = await client.OptionalDictionaryAsync(content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_OptionalDictionary_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.OptionalDictionaryAsync(); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_OptionalDictionary_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - key = 1234, - }); - Response response = await client.OptionalDictionaryAsync(content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_OptionalDictionary_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.OptionalDictionaryAsync(body: new Dictionary - { - ["key"] = 1234 - }); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_AzureLocationOp_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = null; - Response response = await client.AzureLocationOpAsync(new AzureLocation(""), new AzureLocation(""), content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_AzureLocationOp_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - Response response = await client.AzureLocationOpAsync(new AzureLocation(""), new AzureLocation("")); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_AzureLocationOp_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - location = "", - }); - Response response = await client.AzureLocationOpAsync(new AzureLocation(""), new AzureLocation(""), content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_AzureLocationOp_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - - AzureLocationModel body = new AzureLocationModel(new AzureLocation("")); - Response response = await client.AzureLocationOpAsync(new AzureLocation(""), new AzureLocation(""), body: body); + Response response = await client.TopActionAsync(default); } } } diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/GlossaryTests.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/GlossaryTests.cs deleted file mode 100644 index dba3cc8d124..00000000000 --- a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/GlossaryTests.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure; -using Azure.Identity; -using FirstTestTypeSpec.Models; -using NUnit.Framework; - -namespace FirstTestTypeSpec.Tests -{ - public partial class GlossaryTests : FirstTestTypeSpecTestBase - { - public GlossaryTests(bool isAsync) : base(isAsync) - { - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task Glossary_DoSomething_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - Glossary client = CreateFirstTestTypeSpecClient(endpoint, credential).GetGlossaryClient(); - - Response response = await client.DoSomethingAsync("", "

", null); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task Glossary_DoSomething_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - Glossary client = CreateFirstTestTypeSpecClient(endpoint, credential).GetGlossaryClient(); - - Response response = await client.DoSomethingAsync("", "

"); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task Glossary_DoSomething_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - Glossary client = CreateFirstTestTypeSpecClient(endpoint, credential).GetGlossaryClient(); - - Response response = await client.DoSomethingAsync("", "

", null); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task Glossary_DoSomething_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - Glossary client = CreateFirstTestTypeSpecClient(endpoint, credential).GetGlossaryClient(); - - Response response = await client.DoSomethingAsync("", "

"); - } - } -} diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/HelloDemo2Tests.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/HelloDemo2Tests.cs deleted file mode 100644 index e6c18c41f51..00000000000 --- a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/HelloDemo2Tests.cs +++ /dev/null @@ -1,581 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Identity; -using FirstTestTypeSpec.Models; -using NUnit.Framework; - -namespace FirstTestTypeSpec.Tests -{ - public partial class HelloDemo2Tests : FirstTestTypeSpecTestBase - { - public HelloDemo2Tests(bool isAsync) : base(isAsync) - { - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task Demo2_HelloAgain_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); - - using RequestContent content = RequestContent.Create(new - { - requiredString = "", - requiredInt = 1234, - requiredCollection = new object[] - { -"1" - }, - requiredDictionary = new - { - key = "1", - }, - requiredModel = new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - requiredBadDescription = "", - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - }, - requiredUnknown = new object(), - requiredRecordUnknown = new - { - key = new object(), - }, - modelWithRequiredNullable = new - { - requiredNullablePrimitive = 1234, - requiredExtensibleEnum = "1", - requiredFixedEnum = "1", - }, - unionList = new object[] - { -"" - }, - }); - Response response = await client.HelloAgainAsync("", "", content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task Demo2_HelloAgain_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); - - RoundTripModel action = new RoundTripModel( - "", - 1234, - new StringFixedEnum[] { StringFixedEnum.One }, - new Dictionary - { - ["key"] = StringExtensibleEnum.One - }, - new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default), - BinaryData.FromObjectAsJson(new object()), - new Dictionary - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - new ModelWithRequiredNullableProperties(1234, StringExtensibleEnum.One, StringFixedEnum.One), - new BinaryData[] - { -BinaryData.FromObjectAsJson("") - }); - Response response = await client.HelloAgainAsync("", "", action); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task Demo2_HelloAgain_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); - - using RequestContent content = RequestContent.Create(new - { - requiredString = "", - requiredInt = 1234, - requiredCollection = new object[] - { -"1" - }, - requiredDictionary = new - { - key = "1", - }, - requiredModel = new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - optionalLiteralString = "reject", - optionalLiteralInt = 456, - optionalLiteralFloat = 4.56F, - optionalLiteralBool = true, - requiredBadDescription = "", - optionalNullableList = new object[] - { -1234 - }, - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - optionalFloatProperty = new object(), - optionalResourceId = "", - }, - intExtensibleEnum = 1, - intExtensibleEnumCollection = new object[] - { -1 - }, - floatExtensibleEnum = 1F, - floatExtensibleEnumCollection = new object[] - { -1F - }, - floatFixedEnum = 1.1F, - floatFixedEnumCollection = new object[] - { -1.1F - }, - intFixedEnum = 1, - intFixedEnumCollection = new object[] - { -1 - }, - stringFixedEnum = "1", - requiredUnknown = new object(), - optionalUnknown = new object(), - requiredRecordUnknown = new - { - key = new object(), - }, - optionalRecordUnknown = new - { - key = new object(), - }, - modelWithRequiredNullable = new - { - requiredNullablePrimitive = 1234, - requiredExtensibleEnum = "1", - requiredFixedEnum = "1", - }, - unionList = new object[] - { -"" - }, - }); - Response response = await client.HelloAgainAsync("", "", content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task Demo2_HelloAgain_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); - - RoundTripModel action = new RoundTripModel( - "", - 1234, - new StringFixedEnum[] { StringFixedEnum.One }, - new Dictionary - { - ["key"] = StringExtensibleEnum.One - }, - new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default) - { - OptionalLiteralString = ThingOptionalLiteralString.Reject, - OptionalLiteralInt = ThingOptionalLiteralInt._456, - OptionalLiteralFloat = ThingOptionalLiteralFloat._456, - OptionalLiteralBool = true, - OptionalNullableList = { 1234 }, - OptionalFloatProperty = (double)default, - OptionalResourceId = new ResourceIdentifier(""), - }, - BinaryData.FromObjectAsJson(new object()), - new Dictionary - { - ["key"] = BinaryData.FromObjectAsJson(new object()) - }, - new ModelWithRequiredNullableProperties(1234, StringExtensibleEnum.One, StringFixedEnum.One), - new BinaryData[] - { -BinaryData.FromObjectAsJson("") - }) - { - IntExtensibleEnum = IntExtensibleEnum.One, - IntExtensibleEnumCollection = { IntExtensibleEnum.One }, - FloatExtensibleEnum = FloatExtensibleEnum.One, - FloatExtensibleEnumCollection = { FloatExtensibleEnum.One }, - FloatFixedEnum = FloatFixedEnum.One, - FloatFixedEnumCollection = { FloatFixedEnum.One }, - IntFixedEnum = IntFixedEnum.One, - IntFixedEnumCollection = { IntFixedEnum.One }, - StringFixedEnum = StringFixedEnum.One, - OptionalUnknown = BinaryData.FromObjectAsJson(new object()), - OptionalRecordUnknown = -{ -["key"] = BinaryData.FromObjectAsJson(new object()) -}, - }; - Response response = await client.HelloAgainAsync("", "", action); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task Demo2_NoContentType_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); - - using RequestContent content = RequestContent.Create(new - { - requiredString = "", - requiredInt = 1234, - requiredCollection = new object[] - { -"1" - }, - requiredDictionary = new - { - key = "1", - }, - requiredModel = new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - requiredBadDescription = "", - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - }, - requiredUnknown = new object(), - requiredRecordUnknown = new - { - key = new object(), - }, - modelWithRequiredNullable = new - { - requiredNullablePrimitive = 1234, - requiredExtensibleEnum = "1", - requiredFixedEnum = "1", - }, - unionList = new object[] - { -"" - }, - }); - Response response = await client.NoContentTypeAsync("", "", content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task Demo2_NoContentType_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); - - using RequestContent content = RequestContent.Create(new - { - requiredString = "", - requiredInt = 1234, - requiredCollection = new object[] - { -"1" - }, - requiredDictionary = new - { - key = "1", - }, - requiredModel = new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - optionalLiteralString = "reject", - optionalLiteralInt = 456, - optionalLiteralFloat = 4.56F, - optionalLiteralBool = true, - requiredBadDescription = "", - optionalNullableList = new object[] - { -1234 - }, - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - optionalFloatProperty = new object(), - optionalResourceId = "", - }, - intExtensibleEnum = 1, - intExtensibleEnumCollection = new object[] - { -1 - }, - floatExtensibleEnum = 1F, - floatExtensibleEnumCollection = new object[] - { -1F - }, - floatFixedEnum = 1.1F, - floatFixedEnumCollection = new object[] - { -1.1F - }, - intFixedEnum = 1, - intFixedEnumCollection = new object[] - { -1 - }, - stringFixedEnum = "1", - requiredUnknown = new object(), - optionalUnknown = new object(), - requiredRecordUnknown = new - { - key = new object(), - }, - optionalRecordUnknown = new - { - key = new object(), - }, - modelWithRequiredNullable = new - { - requiredNullablePrimitive = 1234, - requiredExtensibleEnum = "1", - requiredFixedEnum = "1", - }, - unionList = new object[] - { -"" - }, - }); - Response response = await client.NoContentTypeAsync("", "", content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task Demo2_HelloDemoAgain_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); - - Response response = await client.HelloDemoAgainAsync(null); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task Demo2_HelloDemoAgain_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); - - Response response = await client.HelloDemoAgainAsync(); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task Demo2_HelloDemoAgain_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); - - Response response = await client.HelloDemoAgainAsync(null); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task Demo2_HelloDemoAgain_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); - - Response response = await client.HelloDemoAgainAsync(); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task Demo2_CreateLiteral_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); - - using RequestContent content = RequestContent.Create(new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - requiredBadDescription = "", - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - }); - Response response = await client.CreateLiteralAsync(content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task Demo2_CreateLiteral_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); - - Thing body = new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default); - Response response = await client.CreateLiteralAsync(body); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task Demo2_CreateLiteral_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); - - using RequestContent content = RequestContent.Create(new - { - name = "", - requiredUnion = "", - requiredLiteralString = "accept", - requiredLiteralInt = 123, - requiredLiteralFloat = 1.23F, - requiredLiteralBool = false, - optionalLiteralString = "reject", - optionalLiteralInt = 456, - optionalLiteralFloat = 4.56F, - optionalLiteralBool = true, - requiredBadDescription = "", - optionalNullableList = new object[] - { -1234 - }, - requiredNullableList = new object[] - { -1234 - }, - requiredFloatProperty = new object(), - optionalFloatProperty = new object(), - optionalResourceId = "", - }); - Response response = await client.CreateLiteralAsync(content); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task Demo2_CreateLiteral_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); - - Thing body = new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default) - { - OptionalLiteralString = ThingOptionalLiteralString.Reject, - OptionalLiteralInt = ThingOptionalLiteralInt._456, - OptionalLiteralFloat = ThingOptionalLiteralFloat._456, - OptionalLiteralBool = true, - OptionalNullableList = { 1234 }, - OptionalFloatProperty = (double)default, - OptionalResourceId = new ResourceIdentifier(""), - }; - Response response = await client.CreateLiteralAsync(body); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task Demo2_HelloLiteral_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); - - Response response = await client.HelloLiteralAsync(null); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task Demo2_HelloLiteral_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); - - Response response = await client.HelloLiteralAsync(); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task Demo2_HelloLiteral_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); - - Response response = await client.HelloLiteralAsync(null); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task Demo2_HelloLiteral_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); - - Response response = await client.HelloLiteralAsync(); - } - } -} diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/HelloDemoTests.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/HelloDemoTests.cs deleted file mode 100644 index 78586e0be8f..00000000000 --- a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/HelloDemoTests.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure; -using Azure.Identity; -using NUnit.Framework; - -namespace FirstTestTypeSpec.Tests -{ - public partial class HelloDemoTests : FirstTestTypeSpecTestBase - { - public HelloDemoTests(bool isAsync) : base(isAsync) - { - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task Demo_SayHi_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - HelloDemo client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemoClient(); - - Response response = await client.SayHiAsync("", "", null, null); - } - - [Test] - [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task Demo_SayHi_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = null; - HelloDemo client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemoClient(); - - Response response = await client.SayHiAsync("", "", "", null); - } - } -} From 01322b522894c1cae1b7453ed36772b9b1f25d8e Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Wed, 14 Aug 2024 15:27:00 +0800 Subject: [PATCH 12/27] the simplest case could pass now --- .../TypeSpecInputTypeExampleConverter.cs | 15 +++++++++++++-- .../Generated/Docs/FirstTestTypeSpecClient.xml | 8 ++++---- .../Samples/Samples_FirstTestTypeSpecClient.cs | 8 ++++---- .../Tests/FirstTestTypeSpecClientTests.cs | 4 ++-- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputTypeExampleConverter.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputTypeExampleConverter.cs index e72693e8624..bceb7d64c66 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputTypeExampleConverter.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputTypeExampleConverter.cs @@ -118,12 +118,12 @@ private InputTypeExample CreateOtherExample(ref Utf8JsonReader reader, string? i { bool isFirstProperty = id == null; InputType? type = null; - object? value = null; + JsonElement? rawValue = null; while (reader.TokenType != JsonTokenType.EndObject) { var isKnownProperty = reader.TryReadReferenceId(ref isFirstProperty, ref id) || reader.TryReadWithConverter("type", options, ref type) - || reader.TryReadWithConverter("value", options, ref value); + || reader.TryReadWithConverter("value", options, ref rawValue); if (!isKnownProperty) { @@ -131,6 +131,17 @@ private InputTypeExample CreateOtherExample(ref Utf8JsonReader reader, string? i } } + object? value = rawValue?.ValueKind switch + { + null => throw new JsonException(), + JsonValueKind.Null => null, + JsonValueKind.String => rawValue.Value.GetString(), + JsonValueKind.False => false, + JsonValueKind.True => true, + JsonValueKind.Number => rawValue.Value.GetDouble(), + _ => throw new JsonException($"kind {rawValue?.ValueKind} is not expected here") + }; + var result = new InputExampleRawValue(type ?? throw new JsonException(), value); if (id != null) diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/FirstTestTypeSpecClient.xml b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/FirstTestTypeSpecClient.xml index 7dd7fea81f1..82f94349842 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/FirstTestTypeSpecClient.xml +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/FirstTestTypeSpecClient.xml @@ -8,7 +8,7 @@ This sample shows how to call TopActionAsync. Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); -Response response = await client.TopActionAsync(default); +Response response = await client.TopActionAsync(DateTimeOffset.Parse("2024-05-06T12:20-12Z")); ]]> @@ -18,7 +18,7 @@ This sample shows how to call TopAction. Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); -Response response = client.TopAction(default); +Response response = client.TopAction(DateTimeOffset.Parse("2024-05-06T12:20-12Z")); ]]> @@ -28,7 +28,7 @@ This sample shows how to call TopActionAsync and parse the result. Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); -Response response = await client.TopActionAsync(default, null); +Response response = await client.TopActionAsync(DateTimeOffset.Parse("2024-05-06T12:20-12Z"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -49,7 +49,7 @@ This sample shows how to call TopAction and parse the result. Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); -Response response = client.TopAction(default, null); +Response response = client.TopAction(DateTimeOffset.Parse("2024-05-06T12:20-12Z"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_FirstTestTypeSpecClient.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_FirstTestTypeSpecClient.cs index 73e8b96b8ff..6d57c2092cf 100644 --- a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_FirstTestTypeSpecClient.cs +++ b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_FirstTestTypeSpecClient.cs @@ -24,7 +24,7 @@ public void Example_FirstTestTypeSpec_TopAction_ForTestTopAction() Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - Response response = client.TopAction(default, null); + Response response = client.TopAction(DateTimeOffset.Parse("2024-05-06T12:20-12Z"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -45,7 +45,7 @@ public async Task Example_FirstTestTypeSpec_TopAction_ForTestTopAction_Async() Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - Response response = await client.TopActionAsync(default, null); + Response response = await client.TopActionAsync(DateTimeOffset.Parse("2024-05-06T12:20-12Z"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -66,7 +66,7 @@ public void Example_FirstTestTypeSpec_TopAction_ForTestTopAction_Convenience() Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - Response response = client.TopAction(default); + Response response = client.TopAction(DateTimeOffset.Parse("2024-05-06T12:20-12Z")); } [Test] @@ -76,7 +76,7 @@ public async Task Example_FirstTestTypeSpec_TopAction_ForTestTopAction_Convenien Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - Response response = await client.TopActionAsync(default); + Response response = await client.TopActionAsync(DateTimeOffset.Parse("2024-05-06T12:20-12Z")); } } } diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/FirstTestTypeSpecClientTests.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/FirstTestTypeSpecClientTests.cs index a0dbabdb930..6db2faea894 100644 --- a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/FirstTestTypeSpecClientTests.cs +++ b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/FirstTestTypeSpecClientTests.cs @@ -28,7 +28,7 @@ public async Task FirstTestTypeSpec_TopAction_ForTestTopAction() AzureKeyCredential credential = null; FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - Response response = await client.TopActionAsync(default, null); + Response response = await client.TopActionAsync(DateTimeOffset.Parse("2024-05-06T12:20-12Z"), null); } [Test] @@ -39,7 +39,7 @@ public async Task FirstTestTypeSpec_TopAction_ForTestTopAction_Convenience() AzureKeyCredential credential = null; FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - Response response = await client.TopActionAsync(default); + Response response = await client.TopActionAsync(DateTimeOffset.Parse("2024-05-06T12:20-12Z")); } } } From da1c1876d54558ace3b60d801155184838a27866 Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Thu, 15 Aug 2024 16:43:43 +0800 Subject: [PATCH 13/27] remove some deprecated code --- .../Common/Input/InputTypes/InputOperation.cs | 13 ++------- .../Output/OperationMethodChainBuilder.cs | 27 ------------------- 2 files changed, 2 insertions(+), 38 deletions(-) diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/InputOperation.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/InputOperation.cs index 38d6f9d941c..f687b65f0fd 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/InputOperation.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/InputOperation.cs @@ -119,9 +119,9 @@ public static InputOperation RemoveApiVersionParam(InputOperation operation) public string CleanName => Name.IsNullOrEmpty() ? string.Empty : Name.ToCleanName(); private IReadOnlyList? _examples; - public IReadOnlyList Examples => _examples ??= EnsureRealExamples(); + public IReadOnlyList Examples => _examples ??= EnsureExamples(); - private IReadOnlyList EnsureRealExamples() + private IReadOnlyList EnsureExamples() { // see if we need to generate the mock examples if (Configuration.ExamplesDirectory != null) @@ -133,17 +133,8 @@ private IReadOnlyList EnsureRealExamples() return ExampleMockValueBuilder.BuildOperationExamples(this); } - private readonly Dictionary _mockExamples = new(); - public IReadOnlyDictionary MockExamples => _mockExamples.Any() ? _mockExamples : EnsureExamples(_mockExamples); public IReadOnlyList CodeModelExamples { get; internal set; } = new List(); - private IReadOnlyDictionary EnsureExamples(Dictionary examples) - { - examples[ExampleMockValueBuilder.ShortVersionMockExampleKey] = ExampleMockValueBuilder.BuildOperationExample(this, false); - examples[ExampleMockValueBuilder.MockExampleAllParameterKey] = ExampleMockValueBuilder.BuildOperationExample(this, true); - return examples; - } - public bool IsLongRunning => LongRunning != null; public string Name { get; internal set; } public string? ResourceName { get; } diff --git a/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs b/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs index eca03baf57e..9c3a73d81a5 100644 --- a/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs +++ b/src/AutoRest.CSharp/LowLevel/Output/OperationMethodChainBuilder.cs @@ -162,33 +162,6 @@ private void BuildSamples(LowLevelClientMethod method, List example.Name)); } } - - //foreach (var (exampleKey, operationExample) in Operation.MockExamples) - //{ - // if (!shouldGenerateShortVersion && exampleKey != ExampleMockValueBuilder.ShortVersionMockExampleKey) - // continue; // skip the short example when we decide not to generate it - - // // add protocol method sample - // samples.Add(new( - // _client, - // _typeFactory, - // method, - // operationExample, - // false, - // exampleKey)); - - // // add convenience method sample - // if (method.ConvenienceMethod != null && method.ConvenienceMethod.Signature.Modifiers.HasFlag(Public)) - // { - // samples.Add(new( - // _client, - // _typeFactory, - // method, - // operationExample, - // true, - // exampleKey)); - // } - //} } private LongRunningResultRetrievalMethod? GetLongRunningResultRetrievalMethod(OperationLongRunning? longRunning) From e8e93ad7e51141f8ecf1a03b2c70931e292583f5 Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Thu, 15 Aug 2024 16:48:50 +0800 Subject: [PATCH 14/27] fix test compilation issues --- .../Common/Utilities/NamedTypeSymbolExtensionsTests.cs | 1 + .../Mgmt/Unit/MgmtRestOperationTests.cs | 1 + .../LowLevel/Generation/ModelGenerationTestBase.cs | 1 + 3 files changed, 3 insertions(+) diff --git a/test/AutoRest.TestServer.Tests/Common/Utilities/NamedTypeSymbolExtensionsTests.cs b/test/AutoRest.TestServer.Tests/Common/Utilities/NamedTypeSymbolExtensionsTests.cs index 20cb8c3e034..3f88556ca8c 100644 --- a/test/AutoRest.TestServer.Tests/Common/Utilities/NamedTypeSymbolExtensionsTests.cs +++ b/test/AutoRest.TestServer.Tests/Common/Utilities/NamedTypeSymbolExtensionsTests.cs @@ -114,6 +114,7 @@ public void Method(int? nullableInt, List intList, List nullableIntLi disableXmlDocs: false, generateSampleProject: true, generateTestProject: true, + examplesDirectory: null, helperNamespace: ""); } diff --git a/test/AutoRest.TestServer.Tests/Mgmt/Unit/MgmtRestOperationTests.cs b/test/AutoRest.TestServer.Tests/Mgmt/Unit/MgmtRestOperationTests.cs index ff3c025216c..1d978667a79 100644 --- a/test/AutoRest.TestServer.Tests/Mgmt/Unit/MgmtRestOperationTests.cs +++ b/test/AutoRest.TestServer.Tests/Mgmt/Unit/MgmtRestOperationTests.cs @@ -91,6 +91,7 @@ public void Setup() disableXmlDocs: false, generateSampleProject: true, generateTestProject: true, + examplesDirectory: null, helperNamespace: ""); } diff --git a/test/AutoRest.TestServerLowLevel.Tests/LowLevel/Generation/ModelGenerationTestBase.cs b/test/AutoRest.TestServerLowLevel.Tests/LowLevel/Generation/ModelGenerationTestBase.cs index 7145116a62b..8b8e9ccf579 100644 --- a/test/AutoRest.TestServerLowLevel.Tests/LowLevel/Generation/ModelGenerationTestBase.cs +++ b/test/AutoRest.TestServerLowLevel.Tests/LowLevel/Generation/ModelGenerationTestBase.cs @@ -72,6 +72,7 @@ public void Initialize() disableXmlDocs: false, generateSampleProject: true, generateTestProject: true, + examplesDirectory: null, helperNamespace: ""); } From b135f8dcf82ccb50bdd47f2634e2a45f4e9cf0da Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Fri, 16 Aug 2024 16:00:07 +0800 Subject: [PATCH 15/27] change examples-dir to relative --- src/AutoRest.CSharp/Common/Input/Configuration.cs | 2 +- src/TypeSpec.Extension/Emitter.Csharp/src/emitter.ts | 5 ++++- test/TestProjects/FirstTest-TypeSpec/Configuration.json | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/AutoRest.CSharp/Common/Input/Configuration.cs b/src/AutoRest.CSharp/Common/Input/Configuration.cs index b3970ee5190..7a76d59ed17 100644 --- a/src/AutoRest.CSharp/Common/Input/Configuration.cs +++ b/src/AutoRest.CSharp/Common/Input/Configuration.cs @@ -55,7 +55,7 @@ public static class Options public const string Flavor = "flavor"; public const string GenerateSampleProject = "generate-sample-project"; public const string GenerateTestProject = "generate-test-project"; - public const string ExamplesDirectory = "examples-directory"; + public const string ExamplesDirectory = "examples-dir"; // TODO - this configuration only exists here because we would like a rolling update for all libraries for this feature since it changes so many files. public const string UseModelReaderWriter = "use-model-reader-writer"; // TODO - this configuration only exists here because we would like a rolling update for all libraries for this feature since it changes so many files. diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/emitter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/emitter.ts index 1f7ef68c95a..e0fc43212ac 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/emitter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/emitter.ts @@ -72,7 +72,10 @@ export async function $onEmit(context: EmitContext) { : undefined); configurations["enable-internal-raw-data"] = options["enable-internal-raw-data"]; - configurations["examples-directory"] = options["examples-directory"]; // TODO -- this should be a relative path + const examplesDir = options["examples-dir"] ?? options["examples-directory"]; + if (examplesDir) { + configurations["examples-dir"] = path.relative(outputFolder, examplesDir); + } /* TODO: when we support to emit decorator list https://github.com/Azure/autorest.csharp/issues/4887, we will update to use emitted decorator to identify if it is azure-arm */ /* set azure-arm */ const sdkContext = await createSdkContext( diff --git a/test/TestProjects/FirstTest-TypeSpec/Configuration.json b/test/TestProjects/FirstTest-TypeSpec/Configuration.json index 25c17d39011..aefabf84c0a 100644 --- a/test/TestProjects/FirstTest-TypeSpec/Configuration.json +++ b/test/TestProjects/FirstTest-TypeSpec/Configuration.json @@ -11,5 +11,5 @@ "../../../../../artifacts/bin/AutoRest.CSharp/Debug/net8.0/Generator.Shared", "../../../../../artifacts/bin/AutoRest.CSharp/Debug/net8.0/Azure.Core.Shared" ], - "examples-directory": "C:/Users/dapzhang/Documents/workspace/autorest.csharp/test/TestProjects/FirstTest-TypeSpec/examples" + "examples-dir": "examples" } From a0a7d54b3bc6a4212d165f37f8f90c5400b3a3b2 Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Fri, 16 Aug 2024 17:12:29 +0800 Subject: [PATCH 16/27] remove the old inputoperationexample --- .../Common/Input/CodeModelConverter.cs | 6 +++--- .../Examples/ExampleMockValueBuilder.cs | 18 ------------------ .../Examples/InputOperationExample.cs | 10 ---------- .../Common/Input/InputTypes/InputOperation.cs | 2 +- .../MgmtTest/AutoRest/MgmtTestOutputLibrary.cs | 10 +++++----- .../MgmtTest/Models/MockTestCase.cs | 2 +- .../MgmtTest/Models/OperationExample.cs | 12 +++++++----- src/AutoRest.CSharp/MgmtTest/Models/Sample.cs | 4 ++-- 8 files changed, 19 insertions(+), 45 deletions(-) delete mode 100644 src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputOperationExample.cs diff --git a/src/AutoRest.CSharp/Common/Input/CodeModelConverter.cs b/src/AutoRest.CSharp/Common/Input/CodeModelConverter.cs index f503b6b1772..b67d19b2f9b 100644 --- a/src/AutoRest.CSharp/Common/Input/CodeModelConverter.cs +++ b/src/AutoRest.CSharp/Common/Input/CodeModelConverter.cs @@ -172,9 +172,9 @@ private InputOperation CreateOperation(ServiceRequest serviceRequest, Operation return operationId.Split('_')[0]; } - private IReadOnlyList CreateOperationExamples(InputOperation inputOperation, Operation operation) + private IReadOnlyList CreateOperationExamples(InputOperation inputOperation, Operation operation) { - var result = new List(); + var result = new List(); var exampleOperation = _codeModel.TestModel?.MockTest.ExampleGroups?.FirstOrDefault(g => g.Operation == operation); if (exampleOperation is null) { @@ -185,7 +185,7 @@ private IReadOnlyList CreateOperationExamples(InputOperat var parameters = example.AllParameters .Select(p => new InputParameterExample(CreateOperationParameter(p.Parameter), CreateExampleValue(p.ExampleValue))) .ToList(); - result.Add(new InputOperationExample(inputOperation, parameters, example.Name, example.OriginalFile)); + result.Add(new InputHttpOperationExample(example.Name, null, example.OriginalFile!, parameters)); } return result; } diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/ExampleMockValueBuilder.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/ExampleMockValueBuilder.cs index 9481ccacd44..0449af22d66 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/ExampleMockValueBuilder.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/ExampleMockValueBuilder.cs @@ -42,24 +42,6 @@ private static InputHttpOperationExample BuildOperationExample(InputOperation op return new(name, null, string.Empty, parameterExamples); } - public static InputOperationExample BuildOperationExample(InputOperation operation, bool useAllParameters) - { - _cache.Clear(); - - var parameterExamples = new List(); - foreach (var parameter in operation.Parameters) - { - if (!useAllParameters && !parameter.IsRequired) - { - continue; - } - var parameterExample = BuildParameterExample(parameter, useAllParameters); - parameterExamples.Add(parameterExample); - } - - return new(operation, parameterExamples); - } - private static InputParameterExample BuildParameterExample(InputParameter parameter, bool useAllParameters) { // if the parameter is constant, we just put the constant into the example value instead of mocking a new one diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputOperationExample.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputOperationExample.cs deleted file mode 100644 index 48af467c1eb..00000000000 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputOperationExample.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -using System.Collections.Generic; - -namespace AutoRest.CSharp.Common.Input.Examples -{ - // TODO -- currently we do not need the responses. In the case that in the future we need to handle the responses in examples, we need to add a new class InputExampleResponse and a new property here - internal record InputOperationExample(InputOperation Operation, IReadOnlyList Parameters, string? Name = null, string? ExampleFilePath = null); -} diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/InputOperation.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/InputOperation.cs index c275c8bc44d..5cca7b5e0d8 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/InputOperation.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/InputOperation.cs @@ -133,7 +133,7 @@ private IReadOnlyList EnsureExamples() return ExampleMockValueBuilder.BuildOperationExamples(this); } - public IReadOnlyList CodeModelExamples { get; internal set; } = new List(); + public IReadOnlyList CodeModelExamples { get; internal set; } = Array.Empty(); public bool IsLongRunning => LongRunning != null; public string Name { get; internal set; } diff --git a/src/AutoRest.CSharp/MgmtTest/AutoRest/MgmtTestOutputLibrary.cs b/src/AutoRest.CSharp/MgmtTest/AutoRest/MgmtTestOutputLibrary.cs index 643ab10d7cf..a0994dec802 100644 --- a/src/AutoRest.CSharp/MgmtTest/AutoRest/MgmtTestOutputLibrary.cs +++ b/src/AutoRest.CSharp/MgmtTest/AutoRest/MgmtTestOutputLibrary.cs @@ -44,12 +44,12 @@ private Dictionary> EnsureMockTestCases() var result = new Dictionary>(); foreach (var client in _inputNamespace.Clients) { - foreach (var operation in client.Operations) + foreach (var inputOperation in client.Operations) { - foreach (var example in operation.CodeModelExamples) + foreach (var example in inputOperation.CodeModelExamples) { // we need to find which resource or resource collection this test case belongs - var operationId = example.Operation.OperationId!; + var operationId = inputOperation.OperationId!; // skip this operation if we find it in the `skipped-operations` configuration if (_mgmtTestConfiguration.SkippedOperations.Contains(operationId)) @@ -62,7 +62,7 @@ private Dictionary> EnsureMockTestCases() // the source code generator will never write them if it is not in arm core if (providerForExample.Carrier is ArmClientExtension) continue; - var mockTestCase = new MockTestCase(operationId, providerForExample.Carrier, providerForExample.Operation, example); + var mockTestCase = new MockTestCase(operationId, providerForExample.Carrier, providerForExample.Operation, inputOperation, example); result.AddInList(mockTestCase.Owner, mockTestCase); } } @@ -77,7 +77,7 @@ private IEnumerable FindCarriersFromOperationId(st // it is possible that an operationId does not exist in the MgmtOutputLibrary, because some of the operations are removed by design. For instance, `Operations_List`. if (EnsureOperationIdToProviders().TryGetValue(operationId, out var result)) return result; - return Enumerable.Empty(); + return Array.Empty(); } private Dictionary>? _operationNameToProviders; diff --git a/src/AutoRest.CSharp/MgmtTest/Models/MockTestCase.cs b/src/AutoRest.CSharp/MgmtTest/Models/MockTestCase.cs index 56f26165695..f727dd8532c 100644 --- a/src/AutoRest.CSharp/MgmtTest/Models/MockTestCase.cs +++ b/src/AutoRest.CSharp/MgmtTest/Models/MockTestCase.cs @@ -24,7 +24,7 @@ namespace AutoRest.CSharp.MgmtTest.Models { internal class MockTestCase : OperationExample { - public MockTestCase(string operationId, MgmtTypeProvider carrier, MgmtClientOperation operation, InputOperationExample example) : base(operationId, carrier, operation, example) + public MockTestCase(string operationId, MgmtTypeProvider carrier, MgmtClientOperation operation, InputOperation inputOperation, InputHttpOperationExample example) : base(operationId, carrier, operation, inputOperation, example) { } diff --git a/src/AutoRest.CSharp/MgmtTest/Models/OperationExample.cs b/src/AutoRest.CSharp/MgmtTest/Models/OperationExample.cs index 4b27fa00cf2..bec12064afc 100644 --- a/src/AutoRest.CSharp/MgmtTest/Models/OperationExample.cs +++ b/src/AutoRest.CSharp/MgmtTest/Models/OperationExample.cs @@ -18,7 +18,8 @@ internal class OperationExample { private readonly Lazy> _parameterNameToSerializedNameMapping; - internal protected InputOperationExample _example; + internal protected InputHttpOperationExample _example; + internal protected InputOperation _inputOperation; public string OperationId { get; } public string Name => _example.Name!; @@ -43,10 +44,11 @@ internal class OperationExample private IEnumerable? _pathParameters; public IEnumerable PathParameters => _pathParameters ??= AllParameters.Where(p => p.Parameter.Location == RequestLocation.Path); - protected OperationExample(string operationId, MgmtTypeProvider carrier, MgmtClientOperation operation, InputOperationExample example) + protected OperationExample(string operationId, MgmtTypeProvider carrier, MgmtClientOperation operation, InputOperation inputOperation, InputHttpOperationExample example) { OperationId = operationId; _example = example; + _inputOperation = inputOperation; Carrier = carrier; Operation = operation; _parameterNameToSerializedNameMapping = new Lazy>(EnsureParameterSerializedNames); @@ -60,7 +62,7 @@ private MgmtRestOperation GetRestOperationFromOperationId() return operation; } - throw new InvalidOperationException($"Cannot find operationId {OperationId} in example {_example.Operation.Name}"); + throw new InvalidOperationException($"Cannot find operationId {OperationId} in example {_inputOperation.Name}"); } /// @@ -137,7 +139,7 @@ private Dictionary EnsureParameterSerializedNames() { var result = new Dictionary(StringComparer.OrdinalIgnoreCase); - foreach (var requestParameter in _example.Operation.Parameters) + foreach (var requestParameter in _inputOperation.Parameters) { result.Add(requestParameter.Name, requestParameter.NameInRequest ?? requestParameter.Name); } @@ -153,7 +155,7 @@ private InputParameterExample FindPathExampleParameterBySerializedName(string se // we throw exceptions here because path parameter cannot be optional, therefore if we do not find a parameter in the example, there must be an issue in the example if (parameter == null) - throw new InvalidOperationException($"Cannot find a parameter in test case {_example.Operation.Name} with the name of {serializedName}"); + throw new InvalidOperationException($"Cannot find a parameter in test case {_inputOperation.Name} with the name of {serializedName}"); return parameter; } diff --git a/src/AutoRest.CSharp/MgmtTest/Models/Sample.cs b/src/AutoRest.CSharp/MgmtTest/Models/Sample.cs index ff99090b338..0ee2e5b49c9 100644 --- a/src/AutoRest.CSharp/MgmtTest/Models/Sample.cs +++ b/src/AutoRest.CSharp/MgmtTest/Models/Sample.cs @@ -8,7 +8,7 @@ namespace AutoRest.CSharp.MgmtTest.Models { internal class Sample : MockTestCase { - public Sample(MockTestCase testCase) : base(testCase.OperationId, testCase.Carrier, testCase.Operation, testCase._example) + public Sample(MockTestCase testCase) : base(testCase.OperationId, testCase.Carrier, testCase.Operation, testCase._inputOperation, testCase._example) { } @@ -21,6 +21,6 @@ protected override InputTypeExample ReplacePathParameterValue(string serializedN return value; } - public string ExampleFilepath => _example.ExampleFilePath!; + public string ExampleFilepath => _example.FilePath; } } From 216dabf00e8e427b4c45f5cd5d1b39720b209b04 Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Fri, 16 Aug 2024 17:15:23 +0800 Subject: [PATCH 17/27] revert a filename change --- .../Common/Input/CodeModelConverter.cs | 4 +- .../Examples/ExampleMockValueBuilder.cs | 108 +++++++++--------- .../InputTypes/Examples/InputExampleValue.cs | 24 ++++ .../Examples/InputParameterExample.cs | 2 +- .../InputTypes/Examples/InputTypeExample.cs | 24 ---- .../TypeSpecInputParameterExampleConverter.cs | 2 +- .../TypeSpecInputTypeExampleConverter.cs | 24 ++-- .../Extensions/Snippets.ExampleValues.cs | 34 +++--- .../Output/Samples/DpgOperationSample.cs | 12 +- .../Samples/InputExampleParameterValue.cs | 8 +- .../Extensions/CodeWriterExtensions.cs | 32 +++--- .../MgmtTest/Models/ExampleParameterValue.cs | 6 +- .../MgmtTest/Models/MockTestCase.cs | 4 +- .../MgmtTest/Models/OperationExample.cs | 2 +- src/AutoRest.CSharp/MgmtTest/Models/Sample.cs | 2 +- 15 files changed, 144 insertions(+), 144 deletions(-) create mode 100644 src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputExampleValue.cs delete mode 100644 src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputTypeExample.cs diff --git a/src/AutoRest.CSharp/Common/Input/CodeModelConverter.cs b/src/AutoRest.CSharp/Common/Input/CodeModelConverter.cs index b67d19b2f9b..fac4e9a07db 100644 --- a/src/AutoRest.CSharp/Common/Input/CodeModelConverter.cs +++ b/src/AutoRest.CSharp/Common/Input/CodeModelConverter.cs @@ -190,7 +190,7 @@ private IReadOnlyList CreateOperationExamples(InputOp return result; } - private InputTypeExample CreateExampleValue(ExampleValue exampleValue) + private InputExampleValue CreateExampleValue(ExampleValue exampleValue) { var inputType = CreateType(exampleValue.Schema, exampleValue.Schema.Extensions?.Format, false); if (exampleValue.RawValue != null) @@ -203,7 +203,7 @@ private InputTypeExample CreateExampleValue(ExampleValue exampleValue) } if (exampleValue.Properties is null) { - return InputTypeExample.Null(inputType); + return InputExampleValue.Null(inputType); } else { diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/ExampleMockValueBuilder.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/ExampleMockValueBuilder.cs index 0449af22d66..3284c70dbf2 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/ExampleMockValueBuilder.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/ExampleMockValueBuilder.cs @@ -15,7 +15,7 @@ internal class ExampleMockValueBuilder private static readonly string EndpointMockValue = Configuration.ApiTypes.EndPointSampleValue; - private readonly static ConcurrentDictionary _cache = new(); + private readonly static ConcurrentDictionary _cache = new(); public static IReadOnlyList BuildOperationExamples(InputOperation operation) { @@ -47,30 +47,30 @@ private static InputParameterExample BuildParameterExample(InputParameter parame // if the parameter is constant, we just put the constant into the example value instead of mocking a new one if (parameter.Kind == InputOperationParameterKind.Constant) { - InputTypeExample value; + InputExampleValue value; if (parameter.Type is InputLiteralType { Value: not null } literalValue) { - value = InputTypeExample.Value(parameter.Type, literalValue.Value); + value = InputExampleValue.Value(parameter.Type, literalValue.Value); } else if (parameter.DefaultValue != null) { // when it is constant, it could have DefaultValue - value = InputTypeExample.Value(parameter.Type, parameter.DefaultValue.Value); + value = InputExampleValue.Value(parameter.Type, parameter.DefaultValue.Value); } else if (parameter.Type is InputUnionType unionType && unionType.VariantTypes[0] is InputLiteralType literalType) { // or it could be a union of literal types - value = InputTypeExample.Value(parameter.Type, literalType.Value); + value = InputExampleValue.Value(parameter.Type, literalType.Value); } else if (parameter.Type is InputEnumType enumType && enumType.Values[0].Value is { } enumValue) { // or it could be an enum of a few values - value = InputTypeExample.Value(parameter.Type, enumValue); + value = InputExampleValue.Value(parameter.Type, enumValue); } else { // fallback to null - value = InputTypeExample.Null(parameter.Type); + value = InputExampleValue.Null(parameter.Type); } return new(parameter, value); } @@ -78,13 +78,13 @@ private static InputParameterExample BuildParameterExample(InputParameter parame // if the parameter is endpoint if (parameter.IsEndpoint) { - var value = InputTypeExample.Value(parameter.Type, EndpointMockValue); + var value = InputExampleValue.Value(parameter.Type, EndpointMockValue); return new(parameter, value); } if (parameter.DefaultValue != null) { - var value = InputTypeExample.Value(parameter.Type, parameter.DefaultValue.Value); + var value = InputExampleValue.Value(parameter.Type, parameter.DefaultValue.Value); return new(parameter, value); } @@ -92,94 +92,94 @@ private static InputParameterExample BuildParameterExample(InputParameter parame return new(parameter, exampleValue); } - private static InputTypeExample BuildExampleValue(InputType type, string? hint, bool useAllParameters, HashSet visitedModels) => type switch + private static InputExampleValue BuildExampleValue(InputType type, string? hint, bool useAllParameters, HashSet visitedModels) => type switch { InputListType listType => BuildListExampleValue(listType, hint, useAllParameters, visitedModels), InputDictionaryType dictionaryType => BuildDictionaryExampleValue(dictionaryType, hint, useAllParameters, visitedModels), InputEnumType enumType => BuildEnumExampleValue(enumType), InputPrimitiveType primitiveType => BuildPrimitiveExampleValue(primitiveType, hint), - InputLiteralType literalType => InputTypeExample.Value(literalType, literalType.Value), + InputLiteralType literalType => InputExampleValue.Value(literalType, literalType.Value), InputModelType modelType => BuildModelExampleValue(modelType, useAllParameters, visitedModels), InputUnionType unionType => BuildExampleValue(unionType.VariantTypes[0], hint, useAllParameters, visitedModels), InputNullableType nullableType => BuildExampleValue(nullableType.Type, hint, useAllParameters, visitedModels), InputDateTimeType dateTimeType => BuildDateTimeExampleValue(dateTimeType), InputDurationType durationType => BuildDurationExampleValue(durationType), - _ => InputTypeExample.Object(type, new Dictionary()) + _ => InputExampleValue.Object(type, new Dictionary()) }; - private static InputTypeExample BuildListExampleValue(InputListType listType, string? hint, bool useAllParameters, HashSet visitedModels) + private static InputExampleValue BuildListExampleValue(InputListType listType, string? hint, bool useAllParameters, HashSet visitedModels) { var exampleElementValue = BuildExampleValue(listType.ValueType, hint, useAllParameters, visitedModels); - return InputTypeExample.List(listType, new[] { exampleElementValue }); + return InputExampleValue.List(listType, new[] { exampleElementValue }); } - private static InputTypeExample BuildDictionaryExampleValue(InputDictionaryType dictionaryType, string? hint, bool useAllParameters, HashSet visitedModels) + private static InputExampleValue BuildDictionaryExampleValue(InputDictionaryType dictionaryType, string? hint, bool useAllParameters, HashSet visitedModels) { var exampleValue = BuildExampleValue(dictionaryType.ValueType, hint, useAllParameters, visitedModels); - return InputTypeExample.Object(dictionaryType, new Dictionary + return InputExampleValue.Object(dictionaryType, new Dictionary { ["key"] = exampleValue }); } - private static InputTypeExample BuildEnumExampleValue(InputEnumType enumType) + private static InputExampleValue BuildEnumExampleValue(InputEnumType enumType) { var enumValue = enumType.Values.First(); - return InputTypeExample.Value(enumType, enumValue.Value); + return InputExampleValue.Value(enumType, enumValue.Value); } - private static InputTypeExample BuildPrimitiveExampleValue(InputPrimitiveType primitiveType, string? hint) => primitiveType.Kind switch + private static InputExampleValue BuildPrimitiveExampleValue(InputPrimitiveType primitiveType, string? hint) => primitiveType.Kind switch { - InputPrimitiveTypeKind.Stream => InputTypeExample.Stream(primitiveType, ""), - InputPrimitiveTypeKind.Boolean => InputTypeExample.Value(primitiveType, true), - InputPrimitiveTypeKind.PlainDate => InputTypeExample.Value(primitiveType, "2022-05-10"), - InputPrimitiveTypeKind.Float32 => InputTypeExample.Value(primitiveType, 123.45f), - InputPrimitiveTypeKind.Float64 => InputTypeExample.Value(primitiveType, 123.45d), - InputPrimitiveTypeKind.Decimal or InputPrimitiveTypeKind.Decimal128 => InputTypeExample.Value(primitiveType, 123.45m), - InputPrimitiveTypeKind.Int8 => InputTypeExample.Value(primitiveType, (sbyte)123), - InputPrimitiveTypeKind.UInt8 => InputTypeExample.Value(primitiveType, (byte)123), - InputPrimitiveTypeKind.Int32 => InputTypeExample.Value(primitiveType, 1234), - InputPrimitiveTypeKind.Int64 => InputTypeExample.Value(primitiveType, 1234L), - InputPrimitiveTypeKind.SafeInt => InputTypeExample.Value(primitiveType, 1234L), + InputPrimitiveTypeKind.Stream => InputExampleValue.Stream(primitiveType, ""), + InputPrimitiveTypeKind.Boolean => InputExampleValue.Value(primitiveType, true), + InputPrimitiveTypeKind.PlainDate => InputExampleValue.Value(primitiveType, "2022-05-10"), + InputPrimitiveTypeKind.Float32 => InputExampleValue.Value(primitiveType, 123.45f), + InputPrimitiveTypeKind.Float64 => InputExampleValue.Value(primitiveType, 123.45d), + InputPrimitiveTypeKind.Decimal or InputPrimitiveTypeKind.Decimal128 => InputExampleValue.Value(primitiveType, 123.45m), + InputPrimitiveTypeKind.Int8 => InputExampleValue.Value(primitiveType, (sbyte)123), + InputPrimitiveTypeKind.UInt8 => InputExampleValue.Value(primitiveType, (byte)123), + InputPrimitiveTypeKind.Int32 => InputExampleValue.Value(primitiveType, 1234), + InputPrimitiveTypeKind.Int64 => InputExampleValue.Value(primitiveType, 1234L), + InputPrimitiveTypeKind.SafeInt => InputExampleValue.Value(primitiveType, 1234L), InputPrimitiveTypeKind.String => primitiveType.CrossLanguageDefinitionId switch { - InputPrimitiveType.UuidId => InputTypeExample.Value(primitiveType, "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), - _ => string.IsNullOrWhiteSpace(hint) ? InputTypeExample.Value(primitiveType, "") : InputTypeExample.Value(primitiveType, $"<{hint}>") + InputPrimitiveType.UuidId => InputExampleValue.Value(primitiveType, "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), + _ => string.IsNullOrWhiteSpace(hint) ? InputExampleValue.Value(primitiveType, "") : InputExampleValue.Value(primitiveType, $"<{hint}>") }, - InputPrimitiveTypeKind.PlainTime => InputTypeExample.Value(primitiveType, "01:23:45"), - InputPrimitiveTypeKind.Url => InputTypeExample.Value(primitiveType, "http://localhost:3000"), - _ => InputTypeExample.Object(primitiveType, new Dictionary()) + InputPrimitiveTypeKind.PlainTime => InputExampleValue.Value(primitiveType, "01:23:45"), + InputPrimitiveTypeKind.Url => InputExampleValue.Value(primitiveType, "http://localhost:3000"), + _ => InputExampleValue.Object(primitiveType, new Dictionary()) }; - private static InputTypeExample BuildDateTimeExampleValue(InputDateTimeType dateTimeType) => dateTimeType.Encode switch + private static InputExampleValue BuildDateTimeExampleValue(InputDateTimeType dateTimeType) => dateTimeType.Encode switch { - DateTimeKnownEncoding.Rfc7231 => InputTypeExample.Value(dateTimeType.WireType, "Tue, 10 May 2022 18:57:31 GMT"), - DateTimeKnownEncoding.Rfc3339 => InputTypeExample.Value(dateTimeType.WireType, "2022-05-10T18:57:31.2311892Z"), - DateTimeKnownEncoding.UnixTimestamp => InputTypeExample.Value(dateTimeType.WireType, 1652209051), - _ => InputTypeExample.Null(dateTimeType) + DateTimeKnownEncoding.Rfc7231 => InputExampleValue.Value(dateTimeType.WireType, "Tue, 10 May 2022 18:57:31 GMT"), + DateTimeKnownEncoding.Rfc3339 => InputExampleValue.Value(dateTimeType.WireType, "2022-05-10T18:57:31.2311892Z"), + DateTimeKnownEncoding.UnixTimestamp => InputExampleValue.Value(dateTimeType.WireType, 1652209051), + _ => InputExampleValue.Null(dateTimeType) }; - private static InputTypeExample BuildDurationExampleValue(InputDurationType durationType) => durationType.Encode switch + private static InputExampleValue BuildDurationExampleValue(InputDurationType durationType) => durationType.Encode switch { - DurationKnownEncoding.Iso8601 => InputTypeExample.Value(durationType.WireType, "PT1H23M45S"), + DurationKnownEncoding.Iso8601 => InputExampleValue.Value(durationType.WireType, "PT1H23M45S"), DurationKnownEncoding.Seconds => durationType.WireType.Kind switch { - InputPrimitiveTypeKind.Int32 => InputTypeExample.Value(durationType.WireType, 10), - InputPrimitiveTypeKind.Float or InputPrimitiveTypeKind.Float32 => InputTypeExample.Value(durationType.WireType, 10f), - _ => InputTypeExample.Value(durationType.WireType, 3.141592) + InputPrimitiveTypeKind.Int32 => InputExampleValue.Value(durationType.WireType, 10), + InputPrimitiveTypeKind.Float or InputPrimitiveTypeKind.Float32 => InputExampleValue.Value(durationType.WireType, 10f), + _ => InputExampleValue.Value(durationType.WireType, 3.141592) }, - _ => InputTypeExample.Null(durationType) + _ => InputExampleValue.Null(durationType) }; - private static InputTypeExample BuildModelExampleValue(InputModelType model, bool useAllParameters, HashSet visitedModels) + private static InputExampleValue BuildModelExampleValue(InputModelType model, bool useAllParameters, HashSet visitedModels) { if (visitedModels.Contains(model)) - return InputTypeExample.Null(model); + return InputExampleValue.Null(model); - var dict = new Dictionary(); - var result = InputTypeExample.Object(model, dict); + var dict = new Dictionary(); + var result = InputExampleValue.Object(model, dict); visitedModels.Add(model); // if this model has a discriminator, we should return a derived type if (model.DiscriminatorProperty != null) @@ -187,7 +187,7 @@ private static InputTypeExample BuildModelExampleValue(InputModelType model, boo var derived = model.DerivedModels.FirstOrDefault(); if (derived is null) { - return InputTypeExample.Null(model); + return InputExampleValue.Null(model); } else { @@ -210,14 +210,14 @@ private static InputTypeExample BuildModelExampleValue(InputModelType model, boo if (dict.ContainsKey(property.SerializedName)) continue; - InputTypeExample exampleValue; + InputExampleValue exampleValue; if (property.IsDiscriminator) { - exampleValue = InputTypeExample.Value(property.Type, model.DiscriminatorValue!); + exampleValue = InputExampleValue.Value(property.Type, model.DiscriminatorValue!); } else if (property.ConstantValue is { Value: { } constantValue }) { - exampleValue = InputTypeExample.Value(property.Type, constantValue); + exampleValue = InputExampleValue.Value(property.Type, constantValue); } else { diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputExampleValue.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputExampleValue.cs new file mode 100644 index 00000000000..dd22f94fb38 --- /dev/null +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputExampleValue.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System.Collections.Generic; + +namespace AutoRest.CSharp.Common.Input.Examples +{ + internal abstract record InputExampleValue(InputType Type) + { + public static InputExampleValue Null(InputType type) => new InputExampleRawValue(type, null); + public static InputExampleValue Value(InputType type, object? rawValue) => new InputExampleRawValue(type, rawValue); + public static InputExampleValue List(InputType type, IReadOnlyList values) => new InputExampleListValue(type, values); + public static InputExampleValue Object(InputType type, IReadOnlyDictionary properties) => new InputExampleObjectValue(type, properties); + public static InputExampleValue Stream(InputType type, string filename) => new InputExampleStreamValue(type, filename); + } + + internal record InputExampleRawValue(InputType Type, object? RawValue) : InputExampleValue(Type); + + internal record InputExampleListValue(InputType Type, IReadOnlyList Values) : InputExampleValue(Type); + + internal record InputExampleObjectValue(InputType Type, IReadOnlyDictionary Values): InputExampleValue(Type); // TODO -- split this into model and dict + + internal record InputExampleStreamValue(InputType Type, string Filename): InputExampleValue(Type); +} diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputParameterExample.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputParameterExample.cs index 7a92174f61a..2b89d7cb726 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputParameterExample.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputParameterExample.cs @@ -3,5 +3,5 @@ namespace AutoRest.CSharp.Common.Input.Examples { - internal record InputParameterExample(InputParameter Parameter, InputTypeExample ExampleValue); + internal record InputParameterExample(InputParameter Parameter, InputExampleValue ExampleValue); } diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputTypeExample.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputTypeExample.cs deleted file mode 100644 index 34c008ddd4c..00000000000 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputTypeExample.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -using System.Collections.Generic; - -namespace AutoRest.CSharp.Common.Input.Examples -{ - internal abstract record InputTypeExample(InputType Type) - { - public static InputTypeExample Null(InputType type) => new InputExampleRawValue(type, null); - public static InputTypeExample Value(InputType type, object? rawValue) => new InputExampleRawValue(type, rawValue); - public static InputTypeExample List(InputType type, IReadOnlyList values) => new InputExampleListValue(type, values); - public static InputTypeExample Object(InputType type, IReadOnlyDictionary properties) => new InputExampleObjectValue(type, properties); - public static InputTypeExample Stream(InputType type, string filename) => new InputExampleStreamValue(type, filename); - } - - internal record InputExampleRawValue(InputType Type, object? RawValue) : InputTypeExample(Type); - - internal record InputExampleListValue(InputType Type, IReadOnlyList Values) : InputTypeExample(Type); - - internal record InputExampleObjectValue(InputType Type, IReadOnlyDictionary Values): InputTypeExample(Type); // TODO -- split this into model and dict - - internal record InputExampleStreamValue(InputType Type, string Filename): InputTypeExample(Type); -} diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputParameterExampleConverter.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputParameterExampleConverter.cs index 68c74d03396..4cc693612c3 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputParameterExampleConverter.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputParameterExampleConverter.cs @@ -30,7 +30,7 @@ private InputParameterExample CreateInputParameterExample(ref Utf8JsonReader rea { string? id = null; InputParameter? parameter = null; - InputTypeExample? value = null; + InputExampleValue? value = null; var isFirstProperty = true; while (reader.TokenType != JsonTokenType.EndObject) { diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputTypeExampleConverter.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputTypeExampleConverter.cs index bceb7d64c66..1c71cb1fc7a 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputTypeExampleConverter.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputTypeExampleConverter.cs @@ -8,7 +8,7 @@ namespace AutoRest.CSharp.Common.Input.Examples { - internal sealed class TypeSpecInputTypeExampleConverter : JsonConverter + internal sealed class TypeSpecInputTypeExampleConverter : JsonConverter { private const string KindPropertyName = "kind"; @@ -19,19 +19,19 @@ public TypeSpecInputTypeExampleConverter(TypeSpecReferenceHandler referenceHandl _referenceHandler = referenceHandler; } - public override InputTypeExample? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override InputExampleValue? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - return reader.ReadReferenceAndResolve(_referenceHandler.CurrentResolver) ?? CreateObject(ref reader, options); + return reader.ReadReferenceAndResolve(_referenceHandler.CurrentResolver) ?? CreateObject(ref reader, options); } - public override void Write(Utf8JsonWriter writer, InputTypeExample value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, InputExampleValue value, JsonSerializerOptions options) => throw new NotSupportedException("Writing not supported"); - private InputTypeExample CreateObject(ref Utf8JsonReader reader, JsonSerializerOptions options) + private InputExampleValue CreateObject(ref Utf8JsonReader reader, JsonSerializerOptions options) { string? id = null; string? kind = null; - InputTypeExample? result = null; + InputExampleValue? result = null; var isFirstProperty = true; while (reader.TokenType != JsonTokenType.EndObject) { @@ -52,7 +52,7 @@ private InputTypeExample CreateObject(ref Utf8JsonReader reader, JsonSerializerO private const string ArrayKind = "array"; private const string DictionaryKind = "dict"; - private InputTypeExample CreateDerivedType(ref Utf8JsonReader reader, string? id, string? kind, JsonSerializerOptions options) => kind switch + private InputExampleValue CreateDerivedType(ref Utf8JsonReader reader, string? id, string? kind, JsonSerializerOptions options) => kind switch { null => throw new JsonException($"InputTypeExample (id: '{id}') must have a 'kind' property"), ArrayKind => CreateArrayExample(ref reader, id, options, _referenceHandler.CurrentResolver), @@ -60,11 +60,11 @@ private InputTypeExample CreateObject(ref Utf8JsonReader reader, JsonSerializerO _ => CreateOtherExample(ref reader, id, options, _referenceHandler.CurrentResolver), }; - private InputTypeExample CreateArrayExample(ref Utf8JsonReader reader, string? id, JsonSerializerOptions options, ReferenceResolver referenceResolver) + private InputExampleValue CreateArrayExample(ref Utf8JsonReader reader, string? id, JsonSerializerOptions options, ReferenceResolver referenceResolver) { bool isFirstProperty = id == null; InputType? type = null; - IReadOnlyList? value = null; + IReadOnlyList? value = null; while (reader.TokenType != JsonTokenType.EndObject) { var isKnownProperty = reader.TryReadReferenceId(ref isFirstProperty, ref id) @@ -87,11 +87,11 @@ private InputTypeExample CreateArrayExample(ref Utf8JsonReader reader, string? i return result; } - private InputTypeExample CreateObjectExample(ref Utf8JsonReader reader, string? id, JsonSerializerOptions options, ReferenceResolver referenceResolver) + private InputExampleValue CreateObjectExample(ref Utf8JsonReader reader, string? id, JsonSerializerOptions options, ReferenceResolver referenceResolver) { bool isFirstProperty = id == null; InputType? type = null; - IReadOnlyDictionary? value = null; + IReadOnlyDictionary? value = null; while (reader.TokenType != JsonTokenType.EndObject) { var isKnownProperty = reader.TryReadReferenceId(ref isFirstProperty, ref id) @@ -114,7 +114,7 @@ private InputTypeExample CreateObjectExample(ref Utf8JsonReader reader, string? return result; } - private InputTypeExample CreateOtherExample(ref Utf8JsonReader reader, string? id, JsonSerializerOptions options, ReferenceResolver referenceResolver) + private InputExampleValue CreateOtherExample(ref Utf8JsonReader reader, string? id, JsonSerializerOptions options, ReferenceResolver referenceResolver) { bool isFirstProperty = id == null; InputType? type = null; diff --git a/src/AutoRest.CSharp/LowLevel/Extensions/Snippets.ExampleValues.cs b/src/AutoRest.CSharp/LowLevel/Extensions/Snippets.ExampleValues.cs index fc9acb77651..112756b0ad4 100644 --- a/src/AutoRest.CSharp/LowLevel/Extensions/Snippets.ExampleValues.cs +++ b/src/AutoRest.CSharp/LowLevel/Extensions/Snippets.ExampleValues.cs @@ -25,7 +25,7 @@ namespace AutoRest.CSharp.LowLevel.Extensions { internal static partial class ExampleValueSnippets { - private static ValueExpression GetExpression(CSharpType type, InputTypeExample exampleValue, SerializationFormat serializationFormat, bool includeCollectionInitialization = true) + private static ValueExpression GetExpression(CSharpType type, InputExampleValue exampleValue, SerializationFormat serializationFormat, bool includeCollectionInitialization = true) => type switch { { IsReadOnlyMemory: true } => GetExpressionForList(type, exampleValue, serializationFormat, true), @@ -36,7 +36,7 @@ private static ValueExpression GetExpression(CSharpType type, InputTypeExample e _ => GetExpressionForTypeProvider(type, exampleValue) }; - private static ValueExpression GetExpressionForFrameworkType(Type frameworkType, InputTypeExample exampleValue, SerializationFormat serializationFormat, bool includeCollectionInitialization = true) + private static ValueExpression GetExpressionForFrameworkType(Type frameworkType, InputExampleValue exampleValue, SerializationFormat serializationFormat, bool includeCollectionInitialization = true) { // handle objects - we usually do not generate object types, but for some rare cases (such as union type) we generate object // and we get this case in the free form object initialization as well @@ -201,7 +201,7 @@ public static ValueExpression GetExpression(InputExampleParameterValue examplePa throw new InvalidOperationException("this should never happen"); } - private static ValueExpression GetExpressionForRequestContent(InputTypeExample value) + private static ValueExpression GetExpressionForRequestContent(InputExampleValue value) { if (value is InputExampleRawValue rawValue && rawValue.RawValue == null) { @@ -214,13 +214,13 @@ private static ValueExpression GetExpressionForRequestContent(InputTypeExample v } } - private static ValueExpression GetExpressionForList(CSharpType listType, InputTypeExample exampleValue, SerializationFormat serializationFormat, bool includeCollectionInitialization = true) + private static ValueExpression GetExpressionForList(CSharpType listType, InputExampleValue exampleValue, SerializationFormat serializationFormat, bool includeCollectionInitialization = true) { var exampleListValue = exampleValue as InputExampleListValue; var elementType = listType.ElementType; var elementExpressions = new List(); // the collections in our generated SDK could never be assigned to, therefore if we have null value here, we can only assign an empty collection - foreach (var itemValue in exampleListValue?.Values ?? Enumerable.Empty()) + foreach (var itemValue in exampleListValue?.Values ?? Enumerable.Empty()) { var elementExpression = GetExpression(elementType, itemValue, serializationFormat, includeCollectionInitialization); elementExpressions.Add(elementExpression); @@ -236,7 +236,7 @@ private static ValueExpression GetExpressionForList(CSharpType listType, InputTy : new ArrayInitializerExpression(elementExpressions.ToArray()); } - private static ValueExpression GetExpressionForDictionary(CSharpType dictionaryType, InputTypeExample exampleValue, SerializationFormat serializationFormat, bool includeCollectionInitialization = true) + private static ValueExpression GetExpressionForDictionary(CSharpType dictionaryType, InputExampleValue exampleValue, SerializationFormat serializationFormat, bool includeCollectionInitialization = true) { var exampleObjectValue = exampleValue as InputExampleObjectValue; // since this is a dictionary, we take the first generic argument as the key type @@ -246,9 +246,9 @@ private static ValueExpression GetExpressionForDictionary(CSharpType dictionaryT var valueType = dictionaryType.Arguments[1]; var elementExpressions = new List<(ValueExpression KeyExpression, ValueExpression ValueExpression)>(); // the collections in our generated SDK could never be assigned to, therefore if we have null value here, we can only assign an empty collection - foreach (var (key, value) in exampleObjectValue?.Values ?? new Dictionary()) + foreach (var (key, value) in exampleObjectValue?.Values ?? new Dictionary()) { - var keyExpression = GetExpression(keyType, InputTypeExample.Value(InputPrimitiveType.String, key), SerializationFormat.Default); + var keyExpression = GetExpression(keyType, InputExampleValue.Value(InputPrimitiveType.String, key), SerializationFormat.Default); var valueExpression = GetExpression(valueType, value, serializationFormat, includeCollectionInitialization); elementExpressions.Add((keyExpression, valueExpression)); } @@ -258,13 +258,13 @@ private static ValueExpression GetExpressionForDictionary(CSharpType dictionaryT : new DictionaryInitializerExpression(elementExpressions.ToArray()); } - private static ValueExpression GetExpressionForBinaryData(InputTypeExample exampleValue) + private static ValueExpression GetExpressionForBinaryData(InputExampleValue exampleValue) { //always use FromObjectAsJson for BinaryData so that the serialization works correctly. return BinaryDataExpression.FromObjectAsJson(GetExpressionForFreeFormObject(exampleValue, true)); } - private static ValueExpression GetExpressionForFreeFormObject(InputTypeExample exampleValue, bool includeCollectionInitialization = true) => exampleValue switch + private static ValueExpression GetExpressionForFreeFormObject(InputExampleValue exampleValue, bool includeCollectionInitialization = true) => exampleValue switch { InputExampleRawValue rawValue => rawValue.RawValue == null ? Null : @@ -280,7 +280,7 @@ private static ValueExpression GetExpressionForBinaryData(InputTypeExample examp private static ValueExpression GetExpressionForAnonymousObject(InputExampleObjectValue exampleObjectValue, bool includeCollectionInitialization = true) { // the collections in our generated SDK could never be assigned to, therefore if we have null value here, we can only assign an empty collection - var keyValues = exampleObjectValue?.Values ?? new Dictionary(); + var keyValues = exampleObjectValue?.Values ?? new Dictionary(); if (keyValues.Any()) { var properties = new Dictionary(); @@ -315,7 +315,7 @@ private static bool CanBeInstantiatedByAnonymousObject(InputExampleObjectValue o return true; } - private static ValueExpression GetExpressionForTypeProvider(CSharpType type, InputTypeExample exampleValue) + private static ValueExpression GetExpressionForTypeProvider(CSharpType type, InputExampleValue exampleValue) { return type.Implementation switch { @@ -325,7 +325,7 @@ private static ValueExpression GetExpressionForTypeProvider(CSharpType type, Inp }; } - private static ObjectType GetActualImplementation(ObjectType objectType, IReadOnlyDictionary valueDict) + private static ObjectType GetActualImplementation(ObjectType objectType, IReadOnlyDictionary valueDict) { var discriminator = objectType.Discriminator; // check if this has a discriminator @@ -346,7 +346,7 @@ private static ObjectType GetActualImplementation(ObjectType objectType, IReadOn return (ObjectType)implementation.Type.Implementation; } - private static ValueExpression GetExpressionForObjectType(ObjectType objectType, IReadOnlyDictionary? valueDict) + private static ValueExpression GetExpressionForObjectType(ObjectType objectType, IReadOnlyDictionary? valueDict) { if (valueDict == null) return Default; @@ -399,9 +399,9 @@ private static ValueExpression GetExpressionForObjectType(ObjectType objectType, return new NewInstanceExpression(objectType.Type, arguments, objectPropertyInitializer); } - private static IReadOnlyDictionary GetPropertiesToWrite(IEnumerable properties, IReadOnlyDictionary valueDict) + private static IReadOnlyDictionary GetPropertiesToWrite(IEnumerable properties, IReadOnlyDictionary valueDict) { - var propertiesToWrite = new Dictionary(); + var propertiesToWrite = new Dictionary(); foreach (var property in properties) { var propertyToDeal = property; @@ -432,7 +432,7 @@ private static IReadOnlyDictionary GetProp return propertiesToWrite; } - private static InputTypeExample? UnwrapExampleValueFromSinglePropertySchema(InputTypeExample exampleValue, FlattenedObjectTypeProperty flattenedProperty) + private static InputExampleValue? UnwrapExampleValueFromSinglePropertySchema(InputExampleValue exampleValue, FlattenedObjectTypeProperty flattenedProperty) { var hierarchyStack = flattenedProperty.BuildHierarchyStack(); // reverse the stack because it is a stack, iterating it will start from the innerest property diff --git a/src/AutoRest.CSharp/LowLevel/Output/Samples/DpgOperationSample.cs b/src/AutoRest.CSharp/LowLevel/Output/Samples/DpgOperationSample.cs index 68cd6baf195..51a31d87a19 100644 --- a/src/AutoRest.CSharp/LowLevel/Output/Samples/DpgOperationSample.cs +++ b/src/AutoRest.CSharp/LowLevel/Output/Samples/DpgOperationSample.cs @@ -259,7 +259,7 @@ private bool ProcessKnownParameters(Dictionary parameterExamples, string name) + protected InputExampleValue? FindExampleValueBySerializedName(IEnumerable parameterExamples, string name) { foreach (var parameterExample in parameterExamples) { @@ -295,14 +295,14 @@ private bool ProcessKnownParameters(Dictionary e.Parameter.IsEndpoint)?.ExampleValue; if (operationParameterValue != null) return operationParameterValue; // sometimes, especially in swagger projects, the parameter used as endpoint in our client, does not have the `IsEndpoint` flag, we have to fallback here so that we could at least have a value for it. - return InputTypeExample.Value(InputPrimitiveType.String, $"<{parameterName}>"); + return InputExampleValue.Value(InputPrimitiveType.String, $"<{parameterName}>"); } private bool NeedsDispose(Parameter parameter) @@ -333,11 +333,11 @@ private bool IsInlineParameter(Parameter parameter) return true; } - private InputTypeExample GetBodyParameterValue() + private InputExampleValue GetBodyParameterValue() { // we have a request body type if (_method.RequestBodyType == null) - return InputTypeExample.Null(InputPrimitiveType.Any); + return InputExampleValue.Null(InputPrimitiveType.Any); //if (Method.RequestBodyType is InputPrimitiveType { Kind: InputTypeKind.Stream }) // return InputExampleValue.Stream(Method.RequestBodyType, ""); @@ -357,7 +357,7 @@ private InputTypeExample GetBodyParameterValue() return bodyParameterExample.ExampleValue; } - return InputTypeExample.Null(_method.RequestBodyType); + return InputExampleValue.Null(_method.RequestBodyType); } private static bool IsSameParameter(Parameter parameter, Parameter knownParameter) diff --git a/src/AutoRest.CSharp/LowLevel/Output/Samples/InputExampleParameterValue.cs b/src/AutoRest.CSharp/LowLevel/Output/Samples/InputExampleParameterValue.cs index 0367cdce9bf..a39fe8ee71c 100644 --- a/src/AutoRest.CSharp/LowLevel/Output/Samples/InputExampleParameterValue.cs +++ b/src/AutoRest.CSharp/LowLevel/Output/Samples/InputExampleParameterValue.cs @@ -11,7 +11,7 @@ namespace AutoRest.CSharp.Output.Samples.Models { /// - /// A represents a value for a parameter, which could either be a , or a as a literal + /// A represents a value for a parameter, which could either be a , or a as a literal /// internal record InputExampleParameterValue { @@ -19,7 +19,7 @@ internal record InputExampleParameterValue public CSharpType Type { get; } - public InputTypeExample? Value { get; } + public InputExampleValue? Value { get; } public ValueExpression? Expression { get; } @@ -29,7 +29,7 @@ private InputExampleParameterValue(string name, CSharpType type) Type = type; } - public InputExampleParameterValue(Reference reference, InputTypeExample value) : this(reference.Name, reference.Type) + public InputExampleParameterValue(Reference reference, InputExampleValue value) : this(reference.Name, reference.Type) { Value = value; } @@ -39,7 +39,7 @@ public InputExampleParameterValue(Reference reference, ValueExpression expressio Expression = expression; } - public InputExampleParameterValue(Parameter parameter, InputTypeExample value) : this(parameter.Name, parameter.Type) + public InputExampleParameterValue(Parameter parameter, InputExampleValue value) : this(parameter.Name, parameter.Type) { Value = value; } diff --git a/src/AutoRest.CSharp/MgmtTest/Extensions/CodeWriterExtensions.cs b/src/AutoRest.CSharp/MgmtTest/Extensions/CodeWriterExtensions.cs index 6fe760fbc43..c23b377c89a 100644 --- a/src/AutoRest.CSharp/MgmtTest/Extensions/CodeWriterExtensions.cs +++ b/src/AutoRest.CSharp/MgmtTest/Extensions/CodeWriterExtensions.cs @@ -34,7 +34,7 @@ internal static class CodeWriterExtensions /// /// /// - public static CodeWriter AppendExampleValue(this CodeWriter writer, InputTypeExample exampleValue, CSharpType? type = null, bool includeCollectionInitialization = true) + public static CodeWriter AppendExampleValue(this CodeWriter writer, InputExampleValue exampleValue, CSharpType? type = null, bool includeCollectionInitialization = true) { // get the type of this schema in the type factory if the type is not specified // get the type from TypeFactory cannot get the replaced types, therefore we need to put an argument in the signature as a hint in case this might happen in the replaced type case @@ -97,7 +97,7 @@ public static CodeWriter AppendExampleParameterValue(this CodeWriter writer, Exa return writer.Append(exampleParameterValue.Expression!); } - private static CodeWriter AppendFrameworkTypeValue(this CodeWriter writer, CSharpType type, InputTypeExample exampleValue, bool includeCollectionInitialization = true) + private static CodeWriter AppendFrameworkTypeValue(this CodeWriter writer, CSharpType type, InputExampleValue exampleValue, bool includeCollectionInitialization = true) { if (type.IsList) return writer.AppendListValue(type, exampleValue as InputExampleListValue, includeCollectionInitialization); @@ -117,7 +117,7 @@ private static CodeWriter AppendFrameworkTypeValue(this CodeWriter writer, CShar return writer.AppendRawValue((exampleValue as InputExampleRawValue)?.RawValue, type.FrameworkType, exampleValue.Type); } - private static CodeWriter AppendDataFactoryElementValue(this CodeWriter writer, CSharpType type, InputTypeExample exampleValue) + private static CodeWriter AppendDataFactoryElementValue(this CodeWriter writer, CSharpType type, InputExampleValue exampleValue) { if (type.FrameworkType != typeof(DataFactoryElement<>)) throw new ArgumentException("DataFactoryElement<> is expected but got: " + type.ToString()); @@ -131,7 +131,7 @@ private static CodeWriter AppendDataFactoryElementValue(this CodeWriter writer, var exampleObjectValue = exampleValue as InputExampleObjectValue; string dfeType = (string)(exampleObjectValue?.Values![DFE_OBJECT_PROPERTY_TYPE] as InputExampleRawValue)?.RawValue!; - InputTypeExample dfeValue = exampleObjectValue?.Values![DFE_OBJECT_PROPERTY_VALUE]!; + InputExampleValue dfeValue = exampleObjectValue?.Values![DFE_OBJECT_PROPERTY_VALUE]!; string createMethodName = dfeType switch { "Expression" => nameof(DataFactoryElement.FromExpression), @@ -155,7 +155,7 @@ private static CodeWriter AppendDataFactoryElementValue(this CodeWriter writer, private static CodeWriter AppendListValue(this CodeWriter writer, CSharpType type, InputExampleListValue? exampleValue, bool includeInitialization = true) { // the collections in our generated SDK could never be assigned to, therefore if we have null value here, we can only assign an empty collection - var elements = exampleValue?.Values ?? Enumerable.Empty(); + var elements = exampleValue?.Values ?? Enumerable.Empty(); // since this is a list, we take the first generic argument (and it should always has this first argument) var elementType = type.Arguments.First(); var initialization = includeInitialization ? (FormattableString)$"new {elementType}[]" : (FormattableString)$""; @@ -179,7 +179,7 @@ private static CodeWriter AppendListValue(this CodeWriter writer, CSharpType typ private static CodeWriter AppendDictionaryValue(this CodeWriter writer, CSharpType type, InputExampleObjectValue? exampleValue, bool includeInitialization = true) { // the collections in our generated SDK could never be assigned to, therefore if we have null value here, we can only assign an empty collection - var keyValues = exampleValue?.Values ?? new Dictionary(); + var keyValues = exampleValue?.Values ?? new Dictionary(); // since this is a dictionary, we take the first generic argument as the key type // this is important because in our SDK, the key of a dictionary is not always a string. It could be a string-like type, for instance, a ResourceIdentifier var keyType = type.Arguments[0]; @@ -220,7 +220,7 @@ private static CodeWriter AppendBinaryData(this CodeWriter writer, InputExampleR } } - private static CodeWriter AppendComplexFrameworkTypeValue(this CodeWriter writer, Type type, InputTypeExample exampleValue) + private static CodeWriter AppendComplexFrameworkTypeValue(this CodeWriter writer, Type type, InputExampleValue exampleValue) { if (exampleValue is not InputExampleObjectValue exampleObjectValue) { @@ -242,7 +242,7 @@ private static CodeWriter AppendComplexFrameworkTypeValue(this CodeWriter writer writer.RemoveTrailingComma(); writer.AppendRaw(")"); // assign values to the optional parameters - var optionalProperties = new Dictionary(); + var optionalProperties = new Dictionary(); foreach ((var propertyName, var metadata) in propertyMetadataDict) { if (metadata.Required) @@ -270,7 +270,7 @@ private static CodeWriter AppendComplexFrameworkTypeValue(this CodeWriter writer return writer; } - private static CodeWriter AppendAnonymousObject(this CodeWriter writer, InputTypeExample exampleValue) + private static CodeWriter AppendAnonymousObject(this CodeWriter writer, InputExampleValue exampleValue) { // check if this is simple type if (exampleValue is InputExampleRawValue exampleRawValue) @@ -384,7 +384,7 @@ _ when _parsableInitializedTypes.Contains(type) => writer.Append($"{type}.Parse( typeof(IPAddress) }; - private static CodeWriter AppendTypeProviderValue(this CodeWriter writer, CSharpType type, InputTypeExample exampleValue) + private static CodeWriter AppendTypeProviderValue(this CodeWriter writer, CSharpType type, InputExampleValue exampleValue) { switch (type.Implementation) { @@ -396,7 +396,7 @@ private static CodeWriter AppendTypeProviderValue(this CodeWriter writer, CSharp return writer.AppendRaw("default"); } - private static ObjectType GetActualImplementation(ObjectType objectType, IReadOnlyDictionary valueDict) + private static ObjectType GetActualImplementation(ObjectType objectType, IReadOnlyDictionary valueDict) { var discriminator = objectType.Discriminator; // check if this has a discriminator @@ -417,7 +417,7 @@ private static ObjectType GetActualImplementation(ObjectType objectType, IReadOn return (ObjectType)implementation.Type.Implementation; } - private static CodeWriter AppendObjectTypeValue(this CodeWriter writer, ObjectType objectType, IReadOnlyDictionary? valueDict) + private static CodeWriter AppendObjectTypeValue(this CodeWriter writer, ObjectType objectType, IReadOnlyDictionary? valueDict) { if (valueDict == null) { @@ -438,7 +438,7 @@ private static CodeWriter AppendObjectTypeValue(this CodeWriter writer, ObjectTy { // try every property, convert them to variable name and see if there are some of them matching var property = propertyDict[parameter.Name]; - InputTypeExample? exampleValue; + InputExampleValue? exampleValue; if (!valueDict.TryGetValue(property.InputModelProperty!.SerializedName, out exampleValue)) { // we could only stand the case that the missing property here is a collection, in this case, we pass an empty collection @@ -476,9 +476,9 @@ private static CodeWriter AppendObjectTypeValue(this CodeWriter writer, ObjectTy return writer; } - private static Dictionary GetPropertiesToWrite(IEnumerable properties, IReadOnlyDictionary valueDict) + private static Dictionary GetPropertiesToWrite(IEnumerable properties, IReadOnlyDictionary valueDict) { - var propertiesToWrite = new Dictionary(); + var propertiesToWrite = new Dictionary(); foreach (var property in properties) { var propertyToDeal = property; @@ -509,7 +509,7 @@ private static CodeWriter AppendObjectTypeValue(this CodeWriter writer, ObjectTy return propertiesToWrite; } - private static InputTypeExample? UnwrapExampleValueFromSinglePropertySchema(InputTypeExample exampleValue, FlattenedObjectTypeProperty flattenedProperty) + private static InputExampleValue? UnwrapExampleValueFromSinglePropertySchema(InputExampleValue exampleValue, FlattenedObjectTypeProperty flattenedProperty) { var hierarchyStack = flattenedProperty.BuildHierarchyStack(); // reverse the stack because it is a stack, iterating it will start from the innerest property diff --git a/src/AutoRest.CSharp/MgmtTest/Models/ExampleParameterValue.cs b/src/AutoRest.CSharp/MgmtTest/Models/ExampleParameterValue.cs index f2376c488e3..d90e8fd781d 100644 --- a/src/AutoRest.CSharp/MgmtTest/Models/ExampleParameterValue.cs +++ b/src/AutoRest.CSharp/MgmtTest/Models/ExampleParameterValue.cs @@ -22,7 +22,7 @@ internal record ExampleParameterValue public CSharpType Type { get; } - public InputTypeExample? Value { get; } + public InputExampleValue? Value { get; } public FormattableString? Expression { get; } @@ -32,7 +32,7 @@ private ExampleParameterValue(string name, CSharpType type) Type = type; } - public ExampleParameterValue(Reference reference, InputTypeExample value) : this(reference.Name, reference.Type) + public ExampleParameterValue(Reference reference, InputExampleValue value) : this(reference.Name, reference.Type) { Value = value; } @@ -42,7 +42,7 @@ public ExampleParameterValue(Reference reference, FormattableString rawValue) : Expression = rawValue; } - public ExampleParameterValue(Parameter parameter, InputTypeExample value) : this(parameter.Name, parameter.Type) + public ExampleParameterValue(Parameter parameter, InputExampleValue value) : this(parameter.Name, parameter.Type) { Value = value; } diff --git a/src/AutoRest.CSharp/MgmtTest/Models/MockTestCase.cs b/src/AutoRest.CSharp/MgmtTest/Models/MockTestCase.cs index f727dd8532c..e787805e3f5 100644 --- a/src/AutoRest.CSharp/MgmtTest/Models/MockTestCase.cs +++ b/src/AutoRest.CSharp/MgmtTest/Models/MockTestCase.cs @@ -91,7 +91,7 @@ private Tuple EnsureParameterValueMapping() // if this parameter is a body parameter, we might have changed it to required, and we cannot tell if we have changed it on the codemodel right now. In this case we just fake an empty body. if (parameter.DefaultValue == null && parameter.RequestLocation == RequestLocation.Body) { - exampleParameter ??= new(new InputParameter(), new InputExampleObjectValue(InputPrimitiveType.Boolean, new Dictionary())); + exampleParameter ??= new(new InputParameter(), new InputExampleObjectValue(InputPrimitiveType.Boolean, new Dictionary())); } if (exampleParameter == null) { @@ -152,7 +152,7 @@ private static bool ProcessKnownParameters(MappingObject result, Parameter param public bool IsPageable => Operation.IsPagingOperation; - protected override InputTypeExample ReplacePathParameterValue(string serializedName, CSharpType type, InputTypeExample value) + protected override InputExampleValue ReplacePathParameterValue(string serializedName, CSharpType type, InputExampleValue value) { if (serializedName == "subscriptionId") { diff --git a/src/AutoRest.CSharp/MgmtTest/Models/OperationExample.cs b/src/AutoRest.CSharp/MgmtTest/Models/OperationExample.cs index bec12064afc..b6c038eef8f 100644 --- a/src/AutoRest.CSharp/MgmtTest/Models/OperationExample.cs +++ b/src/AutoRest.CSharp/MgmtTest/Models/OperationExample.cs @@ -132,7 +132,7 @@ private ExampleParameterValue FindExampleParameterValueFromReference(Reference r return new ExampleParameterValue(reference, exampleValue); } - protected virtual InputTypeExample ReplacePathParameterValue(string serializedName, CSharpType type, InputTypeExample value) + protected virtual InputExampleValue ReplacePathParameterValue(string serializedName, CSharpType type, InputExampleValue value) => value; private Dictionary EnsureParameterSerializedNames() diff --git a/src/AutoRest.CSharp/MgmtTest/Models/Sample.cs b/src/AutoRest.CSharp/MgmtTest/Models/Sample.cs index 0ee2e5b49c9..536b7b52571 100644 --- a/src/AutoRest.CSharp/MgmtTest/Models/Sample.cs +++ b/src/AutoRest.CSharp/MgmtTest/Models/Sample.cs @@ -15,7 +15,7 @@ public Sample(MockTestCase testCase) : base(testCase.OperationId, testCase.Carri protected override string GetMethodName(bool hasSuffix) => base.GetMethodName(true); // sample will always use a full name - protected override InputTypeExample ReplacePathParameterValue(string serializedName, CSharpType type, InputTypeExample value) + protected override InputExampleValue ReplacePathParameterValue(string serializedName, CSharpType type, InputExampleValue value) { // the samples do not override anything return value; From 0a1629f55fce1583cd2a2ba75d446bd0bc608671 Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Fri, 16 Aug 2024 17:16:32 +0800 Subject: [PATCH 18/27] a few refinement --- .../Input/InputTypes/Examples/ExampleMockValueBuilder.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/ExampleMockValueBuilder.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/ExampleMockValueBuilder.cs index 3284c70dbf2..549d4f890fb 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/ExampleMockValueBuilder.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/ExampleMockValueBuilder.cs @@ -19,6 +19,7 @@ internal class ExampleMockValueBuilder public static IReadOnlyList BuildOperationExamples(InputOperation operation) { + _cache.Clear(); return new[] { BuildOperationExample(operation, ShortVersionMockExampleKey, false), @@ -29,7 +30,7 @@ public static IReadOnlyList BuildOperationExamples(In private static InputHttpOperationExample BuildOperationExample(InputOperation operation, string name, bool useAllParameters) { var parameterExamples = new List(operation.Parameters.Count); - foreach (var parameter in operation.Parameters) + foreach (var parameter in operation.Parameters) { if (!useAllParameters && !parameter.IsRequired) { From a3603704d47d0212c85234088f8e0d9974057e65 Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Fri, 16 Aug 2024 17:23:03 +0800 Subject: [PATCH 19/27] rename the inputoperationexample back --- .../Common/Input/CodeModelConverter.cs | 6 +++--- .../InputTypes/Examples/ExampleMockValueBuilder.cs | 4 ++-- ...pOperationExample.cs => InputOperationExample.cs} | 2 +- .../TypeSpecInputOperationExampleConverter.cs | 12 ++++++------ .../Common/Input/InputTypes/InputOperation.cs | 12 ++++++------ .../Serialization/TypeSpecInputOperationConverter.cs | 2 +- .../LowLevel/Output/Samples/DpgOperationSample.cs | 4 ++-- src/AutoRest.CSharp/MgmtTest/Models/MockTestCase.cs | 2 +- .../MgmtTest/Models/OperationExample.cs | 4 ++-- 9 files changed, 24 insertions(+), 24 deletions(-) rename src/AutoRest.CSharp/Common/Input/InputTypes/Examples/{InputHttpOperationExample.cs => InputOperationExample.cs} (75%) diff --git a/src/AutoRest.CSharp/Common/Input/CodeModelConverter.cs b/src/AutoRest.CSharp/Common/Input/CodeModelConverter.cs index fac4e9a07db..e1ccc8fad58 100644 --- a/src/AutoRest.CSharp/Common/Input/CodeModelConverter.cs +++ b/src/AutoRest.CSharp/Common/Input/CodeModelConverter.cs @@ -172,9 +172,9 @@ private InputOperation CreateOperation(ServiceRequest serviceRequest, Operation return operationId.Split('_')[0]; } - private IReadOnlyList CreateOperationExamples(InputOperation inputOperation, Operation operation) + private IReadOnlyList CreateOperationExamples(InputOperation inputOperation, Operation operation) { - var result = new List(); + var result = new List(); var exampleOperation = _codeModel.TestModel?.MockTest.ExampleGroups?.FirstOrDefault(g => g.Operation == operation); if (exampleOperation is null) { @@ -185,7 +185,7 @@ private IReadOnlyList CreateOperationExamples(InputOp var parameters = example.AllParameters .Select(p => new InputParameterExample(CreateOperationParameter(p.Parameter), CreateExampleValue(p.ExampleValue))) .ToList(); - result.Add(new InputHttpOperationExample(example.Name, null, example.OriginalFile!, parameters)); + result.Add(new InputOperationExample(example.Name, null, example.OriginalFile!, parameters)); } return result; } diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/ExampleMockValueBuilder.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/ExampleMockValueBuilder.cs index 549d4f890fb..7ae9e1d193b 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/ExampleMockValueBuilder.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/ExampleMockValueBuilder.cs @@ -17,7 +17,7 @@ internal class ExampleMockValueBuilder private readonly static ConcurrentDictionary _cache = new(); - public static IReadOnlyList BuildOperationExamples(InputOperation operation) + public static IReadOnlyList BuildOperationExamples(InputOperation operation) { _cache.Clear(); return new[] @@ -27,7 +27,7 @@ public static IReadOnlyList BuildOperationExamples(In }; } - private static InputHttpOperationExample BuildOperationExample(InputOperation operation, string name, bool useAllParameters) + private static InputOperationExample BuildOperationExample(InputOperation operation, string name, bool useAllParameters) { var parameterExamples = new List(operation.Parameters.Count); foreach (var parameter in operation.Parameters) diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputHttpOperationExample.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputOperationExample.cs similarity index 75% rename from src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputHttpOperationExample.cs rename to src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputOperationExample.cs index 94232b974d0..b25f4d87f70 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputHttpOperationExample.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/InputOperationExample.cs @@ -6,5 +6,5 @@ namespace AutoRest.CSharp.Common.Input.Examples { // TODO -- currently we do not need the responses. In the case that in the future we need to handle the responses in examples, we need to add a new class InputExampleResponse and a new property here - internal record InputHttpOperationExample(string Name, string? Description, string FilePath, IReadOnlyList Parameters); + internal record InputOperationExample(string Name, string? Description, string FilePath, IReadOnlyList Parameters); } diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputOperationExampleConverter.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputOperationExampleConverter.cs index 6c5f38ea230..5d3e9616c22 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputOperationExampleConverter.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputOperationExampleConverter.cs @@ -8,7 +8,7 @@ namespace AutoRest.CSharp.Common.Input.Examples { - internal sealed class TypeSpecInputOperationExampleConverter : JsonConverter + internal sealed class TypeSpecInputOperationExampleConverter : JsonConverter { private const string KindPropertyName = "kind"; @@ -19,15 +19,15 @@ public TypeSpecInputOperationExampleConverter(TypeSpecReferenceHandler reference _referenceHandler = referenceHandler; } - public override InputHttpOperationExample? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + public override InputOperationExample? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - return reader.ReadReferenceAndResolve(_referenceHandler.CurrentResolver) ?? CreateInputHttpOperationExample(ref reader, options); + return reader.ReadReferenceAndResolve(_referenceHandler.CurrentResolver) ?? CreateInputHttpOperationExample(ref reader, options); } - public override void Write(Utf8JsonWriter writer, InputHttpOperationExample value, JsonSerializerOptions options) + public override void Write(Utf8JsonWriter writer, InputOperationExample value, JsonSerializerOptions options) => throw new NotSupportedException("Writing not supported"); - private InputHttpOperationExample CreateInputHttpOperationExample(ref Utf8JsonReader reader, JsonSerializerOptions options) + private InputOperationExample CreateInputHttpOperationExample(ref Utf8JsonReader reader, JsonSerializerOptions options) { var isFirstProperty = true; string? id = null; @@ -49,7 +49,7 @@ private InputHttpOperationExample CreateInputHttpOperationExample(ref Utf8JsonRe } } - var result = new InputHttpOperationExample(name ?? throw new JsonException(), description, filePath ?? throw new JsonException(), parameters ?? throw new JsonException()); + var result = new InputOperationExample(name ?? throw new JsonException(), description, filePath ?? throw new JsonException(), parameters ?? throw new JsonException()); if (id != null) { diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/InputOperation.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/InputOperation.cs index 5cca7b5e0d8..2d32b4e973a 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/InputOperation.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/InputOperation.cs @@ -34,7 +34,7 @@ public InputOperation( bool generateConvenienceMethod, string crossLanguageDefinitionId, bool keepClientDefaultValue, - IReadOnlyList? examples = null) + IReadOnlyList? examples = null) { Name = name; SpecName = name; @@ -118,22 +118,22 @@ public static InputOperation RemoveApiVersionParam(InputOperation operation) public string CleanName => Name.IsNullOrEmpty() ? string.Empty : Name.ToCleanName(); - private IReadOnlyList? _examples; - public IReadOnlyList Examples => _examples ??= EnsureExamples(); + private IReadOnlyList? _examples; + public IReadOnlyList Examples => _examples ??= EnsureExamples(); - private IReadOnlyList EnsureExamples() + private IReadOnlyList EnsureExamples() { // see if we need to generate the mock examples if (Configuration.ExamplesDirectory != null) { - return Array.Empty(); + return Array.Empty(); } // build the mock examples return ExampleMockValueBuilder.BuildOperationExamples(this); } - public IReadOnlyList CodeModelExamples { get; internal set; } = Array.Empty(); + public IReadOnlyList CodeModelExamples { get; internal set; } = Array.Empty(); public bool IsLongRunning => LongRunning != null; public string Name { get; internal set; } diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecInputOperationConverter.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecInputOperationConverter.cs index f63c98f906f..4de539ebda9 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecInputOperationConverter.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecInputOperationConverter.cs @@ -49,7 +49,7 @@ public static InputOperation CreateOperation(ref Utf8JsonReader reader, string? bool generateConvenienceMethod = false; string? crossLanguageDefinitionId = null; bool keepClientDefaultValue = false; - IReadOnlyList? examples = null; + IReadOnlyList? examples = null; while (reader.TokenType != JsonTokenType.EndObject) { diff --git a/src/AutoRest.CSharp/LowLevel/Output/Samples/DpgOperationSample.cs b/src/AutoRest.CSharp/LowLevel/Output/Samples/DpgOperationSample.cs index 51a31d87a19..00bcf943c0f 100644 --- a/src/AutoRest.CSharp/LowLevel/Output/Samples/DpgOperationSample.cs +++ b/src/AutoRest.CSharp/LowLevel/Output/Samples/DpgOperationSample.cs @@ -24,7 +24,7 @@ namespace AutoRest.CSharp.Output.Samples.Models [DebuggerDisplay("{GetDebuggerDisplay(),nq}")] internal class DpgOperationSample { - public DpgOperationSample(LowLevelClient client, TypeFactory typeFactory, LowLevelClientMethod method, InputOperation inputOperation, InputHttpOperationExample operationExample, bool isConvenienceSample, string exampleKey) + public DpgOperationSample(LowLevelClient client, TypeFactory typeFactory, LowLevelClientMethod method, InputOperation inputOperation, InputOperationExample operationExample, bool isConvenienceSample, string exampleKey) { _client = client; _typeFactory = typeFactory; @@ -38,7 +38,7 @@ public DpgOperationSample(LowLevelClient client, TypeFactory typeFactory, LowLev } protected internal readonly InputOperation _inputOperation; - protected internal readonly InputHttpOperationExample _inputOperationExample; + protected internal readonly InputOperationExample _inputOperationExample; protected internal readonly LowLevelClient _client; protected internal readonly LowLevelClientMethod _method; private readonly TypeFactory _typeFactory; diff --git a/src/AutoRest.CSharp/MgmtTest/Models/MockTestCase.cs b/src/AutoRest.CSharp/MgmtTest/Models/MockTestCase.cs index e787805e3f5..ff02c82c736 100644 --- a/src/AutoRest.CSharp/MgmtTest/Models/MockTestCase.cs +++ b/src/AutoRest.CSharp/MgmtTest/Models/MockTestCase.cs @@ -24,7 +24,7 @@ namespace AutoRest.CSharp.MgmtTest.Models { internal class MockTestCase : OperationExample { - public MockTestCase(string operationId, MgmtTypeProvider carrier, MgmtClientOperation operation, InputOperation inputOperation, InputHttpOperationExample example) : base(operationId, carrier, operation, inputOperation, example) + public MockTestCase(string operationId, MgmtTypeProvider carrier, MgmtClientOperation operation, InputOperation inputOperation, InputOperationExample example) : base(operationId, carrier, operation, inputOperation, example) { } diff --git a/src/AutoRest.CSharp/MgmtTest/Models/OperationExample.cs b/src/AutoRest.CSharp/MgmtTest/Models/OperationExample.cs index b6c038eef8f..f01fe1a6b17 100644 --- a/src/AutoRest.CSharp/MgmtTest/Models/OperationExample.cs +++ b/src/AutoRest.CSharp/MgmtTest/Models/OperationExample.cs @@ -18,7 +18,7 @@ internal class OperationExample { private readonly Lazy> _parameterNameToSerializedNameMapping; - internal protected InputHttpOperationExample _example; + internal protected InputOperationExample _example; internal protected InputOperation _inputOperation; public string OperationId { get; } public string Name => _example.Name!; @@ -44,7 +44,7 @@ internal class OperationExample private IEnumerable? _pathParameters; public IEnumerable PathParameters => _pathParameters ??= AllParameters.Where(p => p.Parameter.Location == RequestLocation.Path); - protected OperationExample(string operationId, MgmtTypeProvider carrier, MgmtClientOperation operation, InputOperation inputOperation, InputHttpOperationExample example) + protected OperationExample(string operationId, MgmtTypeProvider carrier, MgmtClientOperation operation, InputOperation inputOperation, InputOperationExample example) { OperationId = operationId; _example = example; From 9ceb666d92b3c1dc538c9716c169f7da33fb147b Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Fri, 16 Aug 2024 17:29:23 +0800 Subject: [PATCH 20/27] format --- src/TypeSpec.Extension/Emitter.Csharp/src/emitter.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/emitter.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/emitter.ts index e0fc43212ac..549b7a3a2ce 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/emitter.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/emitter.ts @@ -72,9 +72,13 @@ export async function $onEmit(context: EmitContext) { : undefined); configurations["enable-internal-raw-data"] = options["enable-internal-raw-data"]; - const examplesDir = options["examples-dir"] ?? options["examples-directory"]; + const examplesDir = + options["examples-dir"] ?? options["examples-directory"]; if (examplesDir) { - configurations["examples-dir"] = path.relative(outputFolder, examplesDir); + configurations["examples-dir"] = path.relative( + outputFolder, + examplesDir + ); } /* TODO: when we support to emit decorator list https://github.com/Azure/autorest.csharp/issues/4887, we will update to use emitted decorator to identify if it is azure-arm */ /* set azure-arm */ From 50fc167df5404e651315c0f0b3199a640c6c12ed Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Mon, 19 Aug 2024 11:32:52 +0800 Subject: [PATCH 21/27] update --- package-lock.json | 10 +- .../Emitter.Csharp/package.json | 2 +- .../FirstTest-TypeSpec/tspCodeModel.json | 600 +++++++++--------- 3 files changed, 300 insertions(+), 312 deletions(-) diff --git a/package-lock.json b/package-lock.json index 89b0907a936..aa5d0282a75 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2233,8 +2233,8 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "0.1.9-alpha.20240815.31", - "resolved": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA1NjcyMy9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240815.31.tgz", + "version": "0.1.9-alpha.20240818.8", + "resolved": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2MTMxNi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240818.8.tgz", "dev": true, "dependencies": { "json-serialize-refs": "0.1.0-0" @@ -8122,7 +8122,7 @@ "license": "MIT", "dependencies": { "@autorest/csharp": "3.0.0-beta.20240625.4", - "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA1NjcyMy9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240815.31.tgz", + "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2MTMxNi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240818.8.tgz", "json-serialize-refs": "0.1.0-0" }, "devDependencies": { @@ -8475,7 +8475,7 @@ "@types/prettier": "^2.6.3", "@typespec/compiler": "0.59.0", "@typespec/http": "0.59.0", - "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA1NjcyMy9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240815.31.tgz", + "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2MTMxNi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240818.8.tgz", "@typespec/json-schema": "0.59.0", "@typespec/library-linter": "0.59.0", "@typespec/openapi": "0.59.0", @@ -9664,7 +9664,7 @@ "requires": {} }, "@typespec/http-client-csharp": { - "version": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA1NjcyMy9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240815.31.tgz", + "version": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2MTMxNi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240818.8.tgz", "dev": true, "requires": { "json-serialize-refs": "0.1.0-0" diff --git a/src/TypeSpec.Extension/Emitter.Csharp/package.json b/src/TypeSpec.Extension/Emitter.Csharp/package.json index eef7e016ec8..bc4be79f876 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/package.json +++ b/src/TypeSpec.Extension/Emitter.Csharp/package.json @@ -36,7 +36,7 @@ "dependencies": { "@autorest/csharp": "3.0.0-beta.20240625.4", "json-serialize-refs": "0.1.0-0", - "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA1NjcyMy9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240815.31.tgz" + "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2MTMxNi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240818.8.tgz" }, "peerDependencies": { "@azure-tools/typespec-azure-core": ">=0.36.0 <1.0.0", diff --git a/test/TestProjects/FirstTest-TypeSpec/tspCodeModel.json b/test/TestProjects/FirstTest-TypeSpec/tspCodeModel.json index f3937dd56e1..9287428e5ef 100644 --- a/test/TestProjects/FirstTest-TypeSpec/tspCodeModel.json +++ b/test/TestProjects/FirstTest-TypeSpec/tspCodeModel.json @@ -2539,19 +2539,7 @@ "$id": "308", "kind": "string", "type": { - "$id": "309", - "Kind": "utcDateTime", - "Name": "utcDateTime", - "Encode": "rfc3339", - "WireType": { - "$id": "310", - "Kind": "string", - "Name": "string", - "CrossLanguageDefinitionId": "TypeSpec.string", - "Decorators": [] - }, - "CrossLanguageDefinitionId": "TypeSpec.utcDateTime", - "Decorators": [] + "$ref": "295" }, "value": "2024-05-06T12:20-12Z" } @@ -2561,7 +2549,7 @@ ] }, { - "$id": "311", + "$id": "309", "Name": "topAction2", "ResourceName": "FirstTestTypeSpec", "Description": "top level method2", @@ -2571,14 +2559,14 @@ "$ref": "292" }, { - "$id": "312", + "$id": "310", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "313", + "$id": "311", "Kind": "constant", "ValueType": { - "$id": "314", + "$id": "312", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -2599,7 +2587,7 @@ ], "Responses": [ { - "$id": "315", + "$id": "313", "StatusCodes": [ 200 ], @@ -2625,7 +2613,7 @@ "Decorators": [] }, { - "$id": "316", + "$id": "314", "Name": "patchAction", "ResourceName": "FirstTestTypeSpec", "Description": "top level patch", @@ -2635,15 +2623,15 @@ "$ref": "292" }, { - "$id": "317", + "$id": "315", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "318", + "$id": "316", "Kind": "constant", "ValueType": { - "$id": "319", + "$id": "317", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -2662,14 +2650,14 @@ "Decorators": [] }, { - "$id": "320", + "$id": "318", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "321", + "$id": "319", "Kind": "constant", "ValueType": { - "$id": "322", + "$id": "320", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -2688,7 +2676,7 @@ "Decorators": [] }, { - "$id": "323", + "$id": "321", "Name": "body", "NameInRequest": "body", "Type": { @@ -2706,7 +2694,7 @@ ], "Responses": [ { - "$id": "324", + "$id": "322", "StatusCodes": [ 200 ], @@ -2735,7 +2723,7 @@ "Decorators": [] }, { - "$id": "325", + "$id": "323", "Name": "anonymousBody", "ResourceName": "FirstTestTypeSpec", "Description": "body parameter without body decorator", @@ -2745,15 +2733,15 @@ "$ref": "292" }, { - "$id": "326", + "$id": "324", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "327", + "$id": "325", "Kind": "constant", "ValueType": { - "$id": "328", + "$id": "326", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -2772,14 +2760,14 @@ "Decorators": [] }, { - "$id": "329", + "$id": "327", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "330", + "$id": "328", "Kind": "constant", "ValueType": { - "$id": "331", + "$id": "329", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -2798,7 +2786,7 @@ "Decorators": [] }, { - "$id": "332", + "$id": "330", "Name": "anonymousBodyRequest", "NameInRequest": "anonymousBodyRequest", "Type": { @@ -2816,7 +2804,7 @@ ], "Responses": [ { - "$id": "333", + "$id": "331", "StatusCodes": [ 200 ], @@ -2845,7 +2833,7 @@ "Decorators": [] }, { - "$id": "334", + "$id": "332", "Name": "friendlyModel", "ResourceName": "FirstTestTypeSpec", "Description": "Model can have its friendly name", @@ -2855,15 +2843,15 @@ "$ref": "292" }, { - "$id": "335", + "$id": "333", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "336", + "$id": "334", "Kind": "constant", "ValueType": { - "$id": "337", + "$id": "335", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -2882,14 +2870,14 @@ "Decorators": [] }, { - "$id": "338", + "$id": "336", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "339", + "$id": "337", "Kind": "constant", "ValueType": { - "$id": "340", + "$id": "338", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -2908,7 +2896,7 @@ "Decorators": [] }, { - "$id": "341", + "$id": "339", "Name": "friendlyModelRequest", "NameInRequest": "friendlyModelRequest", "Type": { @@ -2926,7 +2914,7 @@ ], "Responses": [ { - "$id": "342", + "$id": "340", "StatusCodes": [ 200 ], @@ -2955,7 +2943,7 @@ "Decorators": [] }, { - "$id": "343", + "$id": "341", "Name": "addTimeHeader", "ResourceName": "FirstTestTypeSpec", "Accessibility": "public", @@ -2964,16 +2952,16 @@ "$ref": "292" }, { - "$id": "344", + "$id": "342", "Name": "repeatabilityFirstSent", "NameInRequest": "Repeatability-First-Sent", "Type": { - "$id": "345", + "$id": "343", "Kind": "utcDateTime", "Name": "utcDateTime", "Encode": "rfc7231", "WireType": { - "$id": "346", + "$id": "344", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -2994,7 +2982,7 @@ ], "Responses": [ { - "$id": "347", + "$id": "345", "StatusCodes": [ 204 ], @@ -3014,7 +3002,7 @@ "Decorators": [] }, { - "$id": "348", + "$id": "346", "Name": "stringFormat", "ResourceName": "FirstTestTypeSpec", "Description": "paramete has string format.", @@ -3024,16 +3012,16 @@ "$ref": "292" }, { - "$id": "349", + "$id": "347", "Name": "subscriptionId", "NameInRequest": "subscriptionId", "Type": { - "$id": "350", + "$id": "348", "Kind": "string", "Name": "uuid", "CrossLanguageDefinitionId": "Azure.Core.uuid", "BaseType": { - "$id": "351", + "$id": "349", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3051,15 +3039,15 @@ "Decorators": [] }, { - "$id": "352", + "$id": "350", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "353", + "$id": "351", "Kind": "constant", "ValueType": { - "$id": "354", + "$id": "352", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3078,7 +3066,7 @@ "Decorators": [] }, { - "$id": "355", + "$id": "353", "Name": "body", "NameInRequest": "body", "Type": { @@ -3096,7 +3084,7 @@ ], "Responses": [ { - "$id": "356", + "$id": "354", "StatusCodes": [ 204 ], @@ -3119,7 +3107,7 @@ "Decorators": [] }, { - "$id": "357", + "$id": "355", "Name": "projectedNameModel", "ResourceName": "FirstTestTypeSpec", "Description": "Model can have its projected name", @@ -3129,15 +3117,15 @@ "$ref": "292" }, { - "$id": "358", + "$id": "356", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "359", + "$id": "357", "Kind": "constant", "ValueType": { - "$id": "360", + "$id": "358", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3156,14 +3144,14 @@ "Decorators": [] }, { - "$id": "361", + "$id": "359", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "362", + "$id": "360", "Kind": "constant", "ValueType": { - "$id": "363", + "$id": "361", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3182,7 +3170,7 @@ "Decorators": [] }, { - "$id": "364", + "$id": "362", "Name": "projectedNameModelRequest", "NameInRequest": "projectedNameModelRequest", "Type": { @@ -3200,7 +3188,7 @@ ], "Responses": [ { - "$id": "365", + "$id": "363", "StatusCodes": [ 200 ], @@ -3229,7 +3217,7 @@ "Decorators": [] }, { - "$id": "366", + "$id": "364", "Name": "returnsAnonymousModel", "ResourceName": "FirstTestTypeSpec", "Description": "return anonymous model", @@ -3239,14 +3227,14 @@ "$ref": "292" }, { - "$id": "367", + "$id": "365", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "368", + "$id": "366", "Kind": "constant", "ValueType": { - "$id": "369", + "$id": "367", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3267,7 +3255,7 @@ ], "Responses": [ { - "$id": "370", + "$id": "368", "StatusCodes": [ 200 ], @@ -3293,7 +3281,7 @@ "Decorators": [] }, { - "$id": "371", + "$id": "369", "Name": "headAsBoolean", "ResourceName": "FirstTestTypeSpec", "Description": "head as boolean.", @@ -3303,11 +3291,11 @@ "$ref": "292" }, { - "$id": "372", + "$id": "370", "Name": "id", "NameInRequest": "id", "Type": { - "$id": "373", + "$id": "371", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3325,7 +3313,7 @@ ], "Responses": [ { - "$id": "374", + "$id": "372", "StatusCodes": [ 204 ], @@ -3345,7 +3333,7 @@ "Decorators": [] }, { - "$id": "375", + "$id": "373", "Name": "stringBody", "ResourceName": "FirstTestTypeSpec", "Description": "The body parameter type is string.", @@ -3355,15 +3343,15 @@ "$ref": "292" }, { - "$id": "376", + "$id": "374", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "377", + "$id": "375", "Kind": "constant", "ValueType": { - "$id": "378", + "$id": "376", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3382,11 +3370,11 @@ "Decorators": [] }, { - "$id": "379", + "$id": "377", "Name": "body", "NameInRequest": "body", "Type": { - "$id": "380", + "$id": "378", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3404,7 +3392,7 @@ ], "Responses": [ { - "$id": "381", + "$id": "379", "StatusCodes": [ 204 ], @@ -3427,7 +3415,7 @@ "Decorators": [] }, { - "$id": "382", + "$id": "380", "Name": "boolBody", "ResourceName": "FirstTestTypeSpec", "Description": "The body parameter type is bool.", @@ -3437,15 +3425,15 @@ "$ref": "292" }, { - "$id": "383", + "$id": "381", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "384", + "$id": "382", "Kind": "constant", "ValueType": { - "$id": "385", + "$id": "383", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3464,11 +3452,11 @@ "Decorators": [] }, { - "$id": "386", + "$id": "384", "Name": "body", "NameInRequest": "body", "Type": { - "$id": "387", + "$id": "385", "Kind": "boolean", "Name": "boolean", "CrossLanguageDefinitionId": "TypeSpec.boolean", @@ -3486,7 +3474,7 @@ ], "Responses": [ { - "$id": "388", + "$id": "386", "StatusCodes": [ 204 ], @@ -3509,7 +3497,7 @@ "Decorators": [] }, { - "$id": "389", + "$id": "387", "Name": "dateTimeBody", "ResourceName": "FirstTestTypeSpec", "Description": "The body parameter type is datetime.", @@ -3519,15 +3507,15 @@ "$ref": "292" }, { - "$id": "390", + "$id": "388", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "391", + "$id": "389", "Kind": "constant", "ValueType": { - "$id": "392", + "$id": "390", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3546,16 +3534,16 @@ "Decorators": [] }, { - "$id": "393", + "$id": "391", "Name": "body", "NameInRequest": "body", "Type": { - "$id": "394", + "$id": "392", "Kind": "utcDateTime", "Name": "utcDateTime", "Encode": "rfc3339", "WireType": { - "$id": "395", + "$id": "393", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3576,7 +3564,7 @@ ], "Responses": [ { - "$id": "396", + "$id": "394", "StatusCodes": [ 204 ], @@ -3599,7 +3587,7 @@ "Decorators": [] }, { - "$id": "397", + "$id": "395", "Name": "returnString", "ResourceName": "FirstTestTypeSpec", "Description": "The return type is datetime.", @@ -3609,14 +3597,14 @@ "$ref": "292" }, { - "$id": "398", + "$id": "396", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "399", + "$id": "397", "Kind": "constant", "ValueType": { - "$id": "400", + "$id": "398", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3637,12 +3625,12 @@ ], "Responses": [ { - "$id": "401", + "$id": "399", "StatusCodes": [ 200 ], "BodyType": { - "$id": "402", + "$id": "400", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3667,7 +3655,7 @@ "Decorators": [] }, { - "$id": "403", + "$id": "401", "Name": "returnUnknown", "ResourceName": "FirstTestTypeSpec", "Accessibility": "public", @@ -3676,14 +3664,14 @@ "$ref": "292" }, { - "$id": "404", + "$id": "402", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "405", + "$id": "403", "Kind": "constant", "ValueType": { - "$id": "406", + "$id": "404", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3704,12 +3692,12 @@ ], "Responses": [ { - "$id": "407", + "$id": "405", "StatusCodes": [ 200 ], "BodyType": { - "$id": "408", + "$id": "406", "Kind": "any", "Name": "unknown", "CrossLanguageDefinitionId": "", @@ -3734,7 +3722,7 @@ "Decorators": [] }, { - "$id": "409", + "$id": "407", "Name": "recursiveExtension", "ResourceName": "FirstTestTypeSpec", "Description": "test parent reference child", @@ -3744,15 +3732,15 @@ "$ref": "292" }, { - "$id": "410", + "$id": "408", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "411", + "$id": "409", "Kind": "constant", "ValueType": { - "$id": "412", + "$id": "410", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3771,7 +3759,7 @@ "Decorators": [] }, { - "$id": "413", + "$id": "411", "Name": "input", "NameInRequest": "input", "Type": { @@ -3789,7 +3777,7 @@ ], "Responses": [ { - "$id": "414", + "$id": "412", "StatusCodes": [ 204 ], @@ -3812,7 +3800,7 @@ "Decorators": [] }, { - "$id": "415", + "$id": "413", "Name": "threeLevelRecursive", "ResourceName": "FirstTestTypeSpec", "Description": "test three level recursive extension", @@ -3822,15 +3810,15 @@ "$ref": "292" }, { - "$id": "416", + "$id": "414", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "417", + "$id": "415", "Kind": "constant", "ValueType": { - "$id": "418", + "$id": "416", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3849,7 +3837,7 @@ "Decorators": [] }, { - "$id": "419", + "$id": "417", "Name": "input", "NameInRequest": "input", "Type": { @@ -3867,7 +3855,7 @@ ], "Responses": [ { - "$id": "420", + "$id": "418", "StatusCodes": [ 204 ], @@ -3890,7 +3878,7 @@ "Decorators": [] }, { - "$id": "421", + "$id": "419", "Name": "recursiveModels", "ResourceName": "FirstTestTypeSpec", "Description": "test child reference parent", @@ -3900,15 +3888,15 @@ "$ref": "292" }, { - "$id": "422", + "$id": "420", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "423", + "$id": "421", "Kind": "constant", "ValueType": { - "$id": "424", + "$id": "422", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3927,7 +3915,7 @@ "Decorators": [] }, { - "$id": "425", + "$id": "423", "Name": "input", "NameInRequest": "input", "Type": { @@ -3945,7 +3933,7 @@ ], "Responses": [ { - "$id": "426", + "$id": "424", "StatusCodes": [ 204 ], @@ -3968,7 +3956,7 @@ "Decorators": [] }, { - "$id": "427", + "$id": "425", "Name": "ContainSelfModels", "ResourceName": "FirstTestTypeSpec", "Description": "test contain self models", @@ -3978,15 +3966,15 @@ "$ref": "292" }, { - "$id": "428", + "$id": "426", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "429", + "$id": "427", "Kind": "constant", "ValueType": { - "$id": "430", + "$id": "428", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4005,7 +3993,7 @@ "Decorators": [] }, { - "$id": "431", + "$id": "429", "Name": "input", "NameInRequest": "input", "Type": { @@ -4023,7 +4011,7 @@ ], "Responses": [ { - "$id": "432", + "$id": "430", "StatusCodes": [ 204 ], @@ -4046,7 +4034,7 @@ "Decorators": [] }, { - "$id": "433", + "$id": "431", "Name": "enumParameter", "ResourceName": "FirstTestTypeSpec", "Description": "test enum parameter.", @@ -4056,7 +4044,7 @@ "$ref": "292" }, { - "$id": "434", + "$id": "432", "Name": "p1", "NameInRequest": "p1", "Type": { @@ -4074,7 +4062,7 @@ ], "Responses": [ { - "$id": "435", + "$id": "433", "StatusCodes": [ 204 ], @@ -4094,7 +4082,7 @@ "Decorators": [] }, { - "$id": "436", + "$id": "434", "Name": "bodyIsModelWithProjectedEnum", "ResourceName": "FirstTestTypeSpec", "Description": "test enum parameter.", @@ -4104,15 +4092,15 @@ "$ref": "292" }, { - "$id": "437", + "$id": "435", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "438", + "$id": "436", "Kind": "constant", "ValueType": { - "$id": "439", + "$id": "437", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4131,7 +4119,7 @@ "Decorators": [] }, { - "$id": "440", + "$id": "438", "Name": "body", "NameInRequest": "body", "Type": { @@ -4149,7 +4137,7 @@ ], "Responses": [ { - "$id": "441", + "$id": "439", "StatusCodes": [ 204 ], @@ -4172,7 +4160,7 @@ "Decorators": [] }, { - "$id": "442", + "$id": "440", "Name": "optionalDictionary", "ResourceName": "FirstTestTypeSpec", "Description": "test optional dictionary.", @@ -4182,15 +4170,15 @@ "$ref": "292" }, { - "$id": "443", + "$id": "441", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "444", + "$id": "442", "Kind": "constant", "ValueType": { - "$id": "445", + "$id": "443", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4209,21 +4197,21 @@ "Decorators": [] }, { - "$id": "446", + "$id": "444", "Name": "body", "NameInRequest": "body", "Type": { - "$id": "447", + "$id": "445", "Kind": "dict", "KeyType": { - "$id": "448", + "$id": "446", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", "Decorators": [] }, "ValueType": { - "$id": "449", + "$id": "447", "Kind": "int32", "Name": "int32", "CrossLanguageDefinitionId": "TypeSpec.int32", @@ -4243,7 +4231,7 @@ ], "Responses": [ { - "$id": "450", + "$id": "448", "StatusCodes": [ 204 ], @@ -4266,7 +4254,7 @@ "Decorators": [] }, { - "$id": "451", + "$id": "449", "Name": "azureLocationOp", "ResourceName": "FirstTestTypeSpec", "Description": "test optional dictionary.", @@ -4276,16 +4264,16 @@ "$ref": "292" }, { - "$id": "452", + "$id": "450", "Name": "location", "NameInRequest": "location", "Type": { - "$id": "453", + "$id": "451", "Kind": "string", "Name": "azureLocation", "CrossLanguageDefinitionId": "Azure.Core.azureLocation", "BaseType": { - "$id": "454", + "$id": "452", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4303,16 +4291,16 @@ "Decorators": [] }, { - "$id": "455", + "$id": "453", "Name": "regenLocation", "NameInRequest": "regen-location", "Type": { - "$id": "456", + "$id": "454", "Kind": "string", "Name": "azureLocation", "CrossLanguageDefinitionId": "Azure.Core.azureLocation", "BaseType": { - "$id": "457", + "$id": "455", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4330,15 +4318,15 @@ "Decorators": [] }, { - "$id": "458", + "$id": "456", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "459", + "$id": "457", "Kind": "constant", "ValueType": { - "$id": "460", + "$id": "458", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4357,7 +4345,7 @@ "Decorators": [] }, { - "$id": "461", + "$id": "459", "Name": "body", "NameInRequest": "body", "Type": { @@ -4375,7 +4363,7 @@ ], "Responses": [ { - "$id": "462", + "$id": "460", "StatusCodes": [ 204 ], @@ -4399,7 +4387,7 @@ } ], "Protocol": { - "$id": "463" + "$id": "461" }, "Parameters": [ { @@ -4409,20 +4397,20 @@ "Decorators": [] }, { - "$id": "464", + "$id": "462", "Name": "Hello", "Operations": [], "Protocol": { - "$id": "465" + "$id": "463" }, "Parent": "FirstTestTypeSpecClient", "Parameters": [ { - "$id": "466", + "$id": "464", "Name": "firstTestTypeSpecUrl", "NameInRequest": "firstTestTypeSpecUrl", "Type": { - "$id": "467", + "$id": "465", "Kind": "url", "Name": "url", "CrossLanguageDefinitionId": "TypeSpec.url" @@ -4441,23 +4429,23 @@ "Decorators": [] }, { - "$id": "468", + "$id": "466", "Name": "HelloDemo", "Description": "Hello world service", "Operations": [ { - "$id": "469", + "$id": "467", "Name": "sayHi", "ResourceName": "Demo", "Description": "Return hi", "Accessibility": "public", "Parameters": [ { - "$id": "470", + "$id": "468", "Name": "firstTestTypeSpecUrl", "NameInRequest": "firstTestTypeSpecUrl", "Type": { - "$id": "471", + "$id": "469", "Kind": "url", "Name": "url", "CrossLanguageDefinitionId": "TypeSpec.url" @@ -4473,11 +4461,11 @@ "Kind": "Client" }, { - "$id": "472", + "$id": "470", "Name": "headParameter", "NameInRequest": "head-parameter", "Type": { - "$id": "473", + "$id": "471", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4493,11 +4481,11 @@ "Decorators": [] }, { - "$id": "474", + "$id": "472", "Name": "queryParameter", "NameInRequest": "queryParameter", "Type": { - "$id": "475", + "$id": "473", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4513,11 +4501,11 @@ "Decorators": [] }, { - "$id": "476", + "$id": "474", "Name": "optionalQuery", "NameInRequest": "optionalQuery", "Type": { - "$id": "477", + "$id": "475", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4533,14 +4521,14 @@ "Decorators": [] }, { - "$id": "478", + "$id": "476", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "479", + "$id": "477", "Kind": "constant", "ValueType": { - "$id": "480", + "$id": "478", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4561,7 +4549,7 @@ ], "Responses": [ { - "$id": "481", + "$id": "479", "StatusCodes": [ 200 ], @@ -4588,33 +4576,33 @@ } ], "Protocol": { - "$id": "482" + "$id": "480" }, "Parent": "Hello", "Parameters": [ { - "$ref": "470" + "$ref": "468" } ], "Decorators": [] }, { - "$id": "483", + "$id": "481", "Name": "HelloDemo2", "Operations": [ { - "$id": "484", + "$id": "482", "Name": "helloAgain", "ResourceName": "Demo2", "Description": "Return hi again", "Accessibility": "public", "Parameters": [ { - "$id": "485", + "$id": "483", "Name": "firstTestTypeSpecUrl", "NameInRequest": "firstTestTypeSpecUrl", "Type": { - "$id": "486", + "$id": "484", "Kind": "url", "Name": "url", "CrossLanguageDefinitionId": "TypeSpec.url" @@ -4630,11 +4618,11 @@ "Kind": "Client" }, { - "$id": "487", + "$id": "485", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "488", + "$id": "486", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4650,14 +4638,14 @@ "Decorators": [] }, { - "$id": "489", + "$id": "487", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "490", + "$id": "488", "Kind": "constant", "ValueType": { - "$id": "491", + "$id": "489", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4676,11 +4664,11 @@ "Decorators": [] }, { - "$id": "492", + "$id": "490", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "493", + "$id": "491", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4696,14 +4684,14 @@ "Decorators": [] }, { - "$id": "494", + "$id": "492", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "495", + "$id": "493", "Kind": "constant", "ValueType": { - "$id": "496", + "$id": "494", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4722,7 +4710,7 @@ "Decorators": [] }, { - "$id": "497", + "$id": "495", "Name": "action", "NameInRequest": "action", "Type": { @@ -4740,7 +4728,7 @@ ], "Responses": [ { - "$id": "498", + "$id": "496", "StatusCodes": [ 200 ], @@ -4769,21 +4757,21 @@ "Decorators": [] }, { - "$id": "499", + "$id": "497", "Name": "noContentType", "ResourceName": "Demo2", "Description": "Return hi again", "Accessibility": "public", "Parameters": [ { - "$ref": "485" + "$ref": "483" }, { - "$id": "500", + "$id": "498", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "501", + "$id": "499", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4799,11 +4787,11 @@ "Decorators": [] }, { - "$id": "502", + "$id": "500", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "503", + "$id": "501", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4819,15 +4807,15 @@ "Decorators": [] }, { - "$id": "504", + "$id": "502", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "505", + "$id": "503", "Kind": "constant", "ValueType": { - "$id": "506", + "$id": "504", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4846,14 +4834,14 @@ "Decorators": [] }, { - "$id": "507", + "$id": "505", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "508", + "$id": "506", "Kind": "constant", "ValueType": { - "$id": "509", + "$id": "507", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4872,7 +4860,7 @@ "Decorators": [] }, { - "$id": "510", + "$id": "508", "Name": "action", "NameInRequest": "action", "Type": { @@ -4890,7 +4878,7 @@ ], "Responses": [ { - "$id": "511", + "$id": "509", "StatusCodes": [ 200 ], @@ -4919,24 +4907,24 @@ "Decorators": [] }, { - "$id": "512", + "$id": "510", "Name": "helloDemoAgain", "ResourceName": "Demo2", "Description": "Return hi in demo2", "Accessibility": "public", "Parameters": [ { - "$ref": "485" + "$ref": "483" }, { - "$id": "513", + "$id": "511", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "514", + "$id": "512", "Kind": "constant", "ValueType": { - "$id": "515", + "$id": "513", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4957,7 +4945,7 @@ ], "Responses": [ { - "$id": "516", + "$id": "514", "StatusCodes": [ 200 ], @@ -4983,25 +4971,25 @@ "Decorators": [] }, { - "$id": "517", + "$id": "515", "Name": "createLiteral", "ResourceName": "Demo2", "Description": "Create with literal value", "Accessibility": "public", "Parameters": [ { - "$ref": "485" + "$ref": "483" }, { - "$id": "518", + "$id": "516", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "519", + "$id": "517", "Kind": "constant", "ValueType": { - "$id": "520", + "$id": "518", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -5020,14 +5008,14 @@ "Decorators": [] }, { - "$id": "521", + "$id": "519", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "522", + "$id": "520", "Kind": "constant", "ValueType": { - "$id": "523", + "$id": "521", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -5046,7 +5034,7 @@ "Decorators": [] }, { - "$id": "524", + "$id": "522", "Name": "body", "NameInRequest": "body", "Type": { @@ -5064,7 +5052,7 @@ ], "Responses": [ { - "$id": "525", + "$id": "523", "StatusCodes": [ 200 ], @@ -5093,24 +5081,24 @@ "Decorators": [] }, { - "$id": "526", + "$id": "524", "Name": "helloLiteral", "ResourceName": "Demo2", "Description": "Send literal parameters", "Accessibility": "public", "Parameters": [ { - "$ref": "485" + "$ref": "483" }, { - "$id": "527", + "$id": "525", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "528", + "$id": "526", "Kind": "constant", "ValueType": { - "$id": "529", + "$id": "527", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -5129,14 +5117,14 @@ "Decorators": [] }, { - "$id": "530", + "$id": "528", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "531", + "$id": "529", "Kind": "constant", "ValueType": { - "$id": "532", + "$id": "530", "Kind": "int32", "Name": "int32", "CrossLanguageDefinitionId": "TypeSpec.int32", @@ -5155,14 +5143,14 @@ "Decorators": [] }, { - "$id": "533", + "$id": "531", "Name": "p3", "NameInRequest": "p3", "Type": { - "$id": "534", + "$id": "532", "Kind": "constant", "ValueType": { - "$id": "535", + "$id": "533", "Kind": "boolean", "Name": "boolean", "CrossLanguageDefinitionId": "TypeSpec.boolean", @@ -5181,14 +5169,14 @@ "Decorators": [] }, { - "$id": "536", + "$id": "534", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "537", + "$id": "535", "Kind": "constant", "ValueType": { - "$id": "538", + "$id": "536", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -5209,7 +5197,7 @@ ], "Responses": [ { - "$id": "539", + "$id": "537", "StatusCodes": [ 200 ], @@ -5236,33 +5224,33 @@ } ], "Protocol": { - "$id": "540" + "$id": "538" }, "Parent": "Hello", "Parameters": [ { - "$ref": "485" + "$ref": "483" } ], "Decorators": [] }, { - "$id": "541", + "$id": "539", "Name": "EnumTest", "Operations": [ { - "$id": "542", + "$id": "540", "Name": "createUnknownValue", "ResourceName": "EnumTest", "Description": "get extensible enum", "Accessibility": "public", "Parameters": [ { - "$id": "543", + "$id": "541", "Name": "firstTestTypeSpecUrl", "NameInRequest": "firstTestTypeSpecUrl", "Type": { - "$id": "544", + "$id": "542", "Kind": "url", "Name": "url", "CrossLanguageDefinitionId": "TypeSpec.url" @@ -5278,15 +5266,15 @@ "Kind": "Client" }, { - "$id": "545", + "$id": "543", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "546", + "$id": "544", "Kind": "constant", "ValueType": { - "$id": "547", + "$id": "545", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -5305,7 +5293,7 @@ "Decorators": [] }, { - "$id": "548", + "$id": "546", "Name": "input", "NameInRequest": "input", "Type": { @@ -5323,7 +5311,7 @@ ], "Responses": [ { - "$id": "549", + "$id": "547", "StatusCodes": [ 204 ], @@ -5347,33 +5335,33 @@ } ], "Protocol": { - "$id": "550" + "$id": "548" }, "Parent": "FirstTestTypeSpecClient", "Parameters": [ { - "$ref": "543" + "$ref": "541" } ], "Decorators": [] }, { - "$id": "551", + "$id": "549", "Name": "ProtocolAndConvenient", "Operations": [ { - "$id": "552", + "$id": "550", "Name": "internalProtocol", "ResourceName": "ProtocolAndConvenient", "Description": "When set protocol false and convenient true, then the protocol method should be internal", "Accessibility": "public", "Parameters": [ { - "$id": "553", + "$id": "551", "Name": "firstTestTypeSpecUrl", "NameInRequest": "firstTestTypeSpecUrl", "Type": { - "$id": "554", + "$id": "552", "Kind": "url", "Name": "url", "CrossLanguageDefinitionId": "TypeSpec.url" @@ -5389,15 +5377,15 @@ "Kind": "Client" }, { - "$id": "555", + "$id": "553", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "556", + "$id": "554", "Kind": "constant", "ValueType": { - "$id": "557", + "$id": "555", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -5416,14 +5404,14 @@ "Decorators": [] }, { - "$id": "558", + "$id": "556", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "559", + "$id": "557", "Kind": "constant", "ValueType": { - "$id": "560", + "$id": "558", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -5442,7 +5430,7 @@ "Decorators": [] }, { - "$id": "561", + "$id": "559", "Name": "body", "NameInRequest": "body", "Type": { @@ -5460,7 +5448,7 @@ ], "Responses": [ { - "$id": "562", + "$id": "560", "StatusCodes": [ 200 ], @@ -5489,19 +5477,19 @@ "Decorators": [] }, { - "$id": "563", + "$id": "561", "Name": "stillConvenient", "ResourceName": "ProtocolAndConvenient", "Description": "When set protocol false and convenient true, the convenient method should be generated even it has the same signature as protocol one", "Accessibility": "public", "Parameters": [ { - "$ref": "553" + "$ref": "551" } ], "Responses": [ { - "$id": "564", + "$id": "562", "StatusCodes": [ 204 ], @@ -5522,33 +5510,33 @@ } ], "Protocol": { - "$id": "565" + "$id": "563" }, "Parent": "FirstTestTypeSpecClient", "Parameters": [ { - "$ref": "553" + "$ref": "551" } ], "Decorators": [] }, { - "$id": "566", + "$id": "564", "Name": "Entity", "Operations": [ { - "$id": "567", + "$id": "565", "Name": "doSomething", "ResourceName": "Entity", "Description": "doSomething for entity", "Accessibility": "public", "Parameters": [ { - "$id": "568", + "$id": "566", "Name": "firstTestTypeSpecUrl", "NameInRequest": "firstTestTypeSpecUrl", "Type": { - "$id": "569", + "$id": "567", "Kind": "url", "Name": "url", "CrossLanguageDefinitionId": "TypeSpec.url" @@ -5564,11 +5552,11 @@ "Kind": "Client" }, { - "$id": "570", + "$id": "568", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "571", + "$id": "569", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -5584,14 +5572,14 @@ "Decorators": [] }, { - "$id": "572", + "$id": "570", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "573", + "$id": "571", "Kind": "constant", "ValueType": { - "$id": "574", + "$id": "572", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -5612,7 +5600,7 @@ ], "Responses": [ { - "$id": "575", + "$id": "573", "StatusCodes": [ 200 ], @@ -5639,33 +5627,33 @@ } ], "Protocol": { - "$id": "576" + "$id": "574" }, "Parent": "FirstTestTypeSpecClient", "Parameters": [ { - "$ref": "568" + "$ref": "566" } ], "Decorators": [] }, { - "$id": "577", + "$id": "575", "Name": "Glossary", "Operations": [ { - "$id": "578", + "$id": "576", "Name": "doSomething", "ResourceName": "Glossary", "Description": "doSomething for glossary", "Accessibility": "public", "Parameters": [ { - "$id": "579", + "$id": "577", "Name": "firstTestTypeSpecUrl", "NameInRequest": "firstTestTypeSpecUrl", "Type": { - "$id": "580", + "$id": "578", "Kind": "url", "Name": "url", "CrossLanguageDefinitionId": "TypeSpec.url" @@ -5681,11 +5669,11 @@ "Kind": "Client" }, { - "$id": "581", + "$id": "579", "Name": "id", "NameInRequest": "id", "Type": { - "$id": "582", + "$id": "580", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -5701,11 +5689,11 @@ "Decorators": [] }, { - "$id": "583", + "$id": "581", "Name": "h1", "NameInRequest": "h1", "Type": { - "$id": "584", + "$id": "582", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -5721,14 +5709,14 @@ "Decorators": [] }, { - "$id": "585", + "$id": "583", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "586", + "$id": "584", "Kind": "constant", "ValueType": { - "$id": "587", + "$id": "585", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -5749,7 +5737,7 @@ ], "Responses": [ { - "$id": "588", + "$id": "586", "StatusCodes": [ 200 ], @@ -5776,27 +5764,27 @@ } ], "Protocol": { - "$id": "589" + "$id": "587" }, "Parent": "FirstTestTypeSpecClient", "Parameters": [ { - "$ref": "579" + "$ref": "577" } ], "Decorators": [] } ], "Auth": { - "$id": "590", + "$id": "588", "OAuth2": { - "$id": "591", + "$id": "589", "Scopes": [ "https://api.example.com/.default" ] }, "ApiKey": { - "$id": "592", + "$id": "590", "Name": "x-ms-api-key" } } From 4be3578a2d71b2a3f78f43e0ac5b108251d195c3 Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Wed, 21 Aug 2024 15:02:32 +0800 Subject: [PATCH 22/27] update version --- package-lock.json | 24 ++++--------------- .../Emitter.Csharp/package.json | 2 +- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9e025228523..361f22606da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2233,8 +2233,8 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "0.1.9-alpha.20240818.8", - "resolved": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2MTMxNi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240818.8.tgz", + "version": "0.1.9-alpha.20240820.33", + "resolved": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2Nzc0NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240820.33.tgz", "dev": true, "dependencies": { "json-serialize-refs": "0.1.0-0" @@ -8122,11 +8122,7 @@ "license": "MIT", "dependencies": { "@autorest/csharp": "3.0.0-beta.20240625.4", -<<<<<<< HEAD - "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2MTMxNi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240818.8.tgz", -======= - "@typespec/http-client-csharp": "0.1.9-alpha.20240820.5", ->>>>>>> origin/feature/v3 + "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2Nzc0NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240820.33.tgz", "json-serialize-refs": "0.1.0-0" }, "devDependencies": { @@ -8479,11 +8475,7 @@ "@types/prettier": "^2.6.3", "@typespec/compiler": "0.59.0", "@typespec/http": "0.59.0", -<<<<<<< HEAD - "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2MTMxNi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240818.8.tgz", -======= - "@typespec/http-client-csharp": "0.1.9-alpha.20240820.5", ->>>>>>> origin/feature/v3 + "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2Nzc0NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240820.33.tgz", "@typespec/json-schema": "0.59.0", "@typespec/library-linter": "0.59.0", "@typespec/openapi": "0.59.0", @@ -9672,13 +9664,7 @@ "requires": {} }, "@typespec/http-client-csharp": { -<<<<<<< HEAD - "version": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2MTMxNi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240818.8.tgz", -======= - "version": "0.1.9-alpha.20240820.5", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20240820.5.tgz", - "integrity": "sha512-QUGk4LXTSFMWeRKlbC1M/H8La1Kyt+IrhZ2RD/DOJ/YQwwK63ZtidO3U+n/C48j+4PnbeVy/10JJqW7FgoA6Vg==", ->>>>>>> origin/feature/v3 + "version": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2Nzc0NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240820.33.tgz", "dev": true, "requires": { "json-serialize-refs": "0.1.0-0" diff --git a/src/TypeSpec.Extension/Emitter.Csharp/package.json b/src/TypeSpec.Extension/Emitter.Csharp/package.json index bc4be79f876..9263077019b 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/package.json +++ b/src/TypeSpec.Extension/Emitter.Csharp/package.json @@ -36,7 +36,7 @@ "dependencies": { "@autorest/csharp": "3.0.0-beta.20240625.4", "json-serialize-refs": "0.1.0-0", - "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2MTMxNi9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240818.8.tgz" + "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2Nzc0NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240820.33.tgz" }, "peerDependencies": { "@azure-tools/typespec-azure-core": ">=0.36.0 <1.0.0", From e2695bed242b1006f9cf59d4e7d2ff380fc1584c Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Wed, 21 Aug 2024 15:29:02 +0800 Subject: [PATCH 23/27] add real examples for anomalydetector --- samples/AnomalyDetector/Configuration.json | 3 +- .../examples/v1.1/ChangePointDetect.json | 2 +- .../{src => }/examples/v1.1/DeleteModel.json | 0 .../examples/v1.1/DetectAnomaly.json | 2 +- .../{src => }/examples/v1.1/EntireDetect.json | 2 +- .../{src => }/examples/v1.1/GetModel.json | 0 .../{src => }/examples/v1.1/GetResult.json | 0 .../{src => }/examples/v1.1/LastDetect.json | 2 +- .../examples/v1.1/LastDetectAnomaly.json | 2 +- .../{src => }/examples/v1.1/ListModel.json | 0 .../{src => }/examples/v1.1/TrainModel.json | 2 +- .../src/Generated/Docs/Multivariate.xml | 1252 +- .../src/Generated/Docs/Univariate.xml | 6972 ++++++- .../Generated/Samples/Samples_Multivariate.cs | 1380 +- .../Generated/Samples/Samples_Univariate.cs | 6798 ++++++- samples/AnomalyDetector/tspCodeModel.json | 15637 +++++++++++++++- samples/AnomalyDetector/tspconfig.yaml | 1 + 17 files changed, 29258 insertions(+), 2797 deletions(-) rename samples/AnomalyDetector/{src => }/examples/v1.1/ChangePointDetect.json (99%) rename samples/AnomalyDetector/{src => }/examples/v1.1/DeleteModel.json (100%) rename samples/AnomalyDetector/{src => }/examples/v1.1/DetectAnomaly.json (98%) rename samples/AnomalyDetector/{src => }/examples/v1.1/EntireDetect.json (99%) rename samples/AnomalyDetector/{src => }/examples/v1.1/GetModel.json (100%) rename samples/AnomalyDetector/{src => }/examples/v1.1/GetResult.json (100%) rename samples/AnomalyDetector/{src => }/examples/v1.1/LastDetect.json (99%) rename samples/AnomalyDetector/{src => }/examples/v1.1/LastDetectAnomaly.json (99%) rename samples/AnomalyDetector/{src => }/examples/v1.1/ListModel.json (100%) rename samples/AnomalyDetector/{src => }/examples/v1.1/TrainModel.json (98%) diff --git a/samples/AnomalyDetector/Configuration.json b/samples/AnomalyDetector/Configuration.json index 5656e97697f..7db97ae5dab 100644 --- a/samples/AnomalyDetector/Configuration.json +++ b/samples/AnomalyDetector/Configuration.json @@ -7,5 +7,6 @@ "shared-source-folders": [ "../../../../artifacts/bin/AutoRest.CSharp/Debug/net8.0/Generator.Shared", "../../../../artifacts/bin/AutoRest.CSharp/Debug/net8.0/Azure.Core.Shared" - ] + ], + "examples-dir": "examples" } diff --git a/samples/AnomalyDetector/src/examples/v1.1/ChangePointDetect.json b/samples/AnomalyDetector/examples/v1.1/ChangePointDetect.json similarity index 99% rename from samples/AnomalyDetector/src/examples/v1.1/ChangePointDetect.json rename to samples/AnomalyDetector/examples/v1.1/ChangePointDetect.json index 961b008f896..a045c22e194 100644 --- a/samples/AnomalyDetector/src/examples/v1.1/ChangePointDetect.json +++ b/samples/AnomalyDetector/examples/v1.1/ChangePointDetect.json @@ -6,7 +6,7 @@ "ApiVersion": "v1.1", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", - "body": { + "options": { "series": [ { "timestamp": "2017-01-01T06:45:00Z", diff --git a/samples/AnomalyDetector/src/examples/v1.1/DeleteModel.json b/samples/AnomalyDetector/examples/v1.1/DeleteModel.json similarity index 100% rename from samples/AnomalyDetector/src/examples/v1.1/DeleteModel.json rename to samples/AnomalyDetector/examples/v1.1/DeleteModel.json diff --git a/samples/AnomalyDetector/src/examples/v1.1/DetectAnomaly.json b/samples/AnomalyDetector/examples/v1.1/DetectAnomaly.json similarity index 98% rename from samples/AnomalyDetector/src/examples/v1.1/DetectAnomaly.json rename to samples/AnomalyDetector/examples/v1.1/DetectAnomaly.json index 429c24f8b9d..afeb27183a3 100644 --- a/samples/AnomalyDetector/src/examples/v1.1/DetectAnomaly.json +++ b/samples/AnomalyDetector/examples/v1.1/DetectAnomaly.json @@ -7,7 +7,7 @@ "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "modelId": "45aad126-aafd-11ea-b8fb-d89ef3400c5f", - "body": { + "options": { "dataSource": "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", "topContributorCount": 10, "startTime": "2019-04-01T00:15:00Z", diff --git a/samples/AnomalyDetector/src/examples/v1.1/EntireDetect.json b/samples/AnomalyDetector/examples/v1.1/EntireDetect.json similarity index 99% rename from samples/AnomalyDetector/src/examples/v1.1/EntireDetect.json rename to samples/AnomalyDetector/examples/v1.1/EntireDetect.json index 1869ce4b95b..dad2fbe78e7 100644 --- a/samples/AnomalyDetector/src/examples/v1.1/EntireDetect.json +++ b/samples/AnomalyDetector/examples/v1.1/EntireDetect.json @@ -6,7 +6,7 @@ "ApiVersion": "v1.1", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", - "body": { + "options": { "series": [ { "timestamp": "1972-01-01T00:00:00Z", diff --git a/samples/AnomalyDetector/src/examples/v1.1/GetModel.json b/samples/AnomalyDetector/examples/v1.1/GetModel.json similarity index 100% rename from samples/AnomalyDetector/src/examples/v1.1/GetModel.json rename to samples/AnomalyDetector/examples/v1.1/GetModel.json diff --git a/samples/AnomalyDetector/src/examples/v1.1/GetResult.json b/samples/AnomalyDetector/examples/v1.1/GetResult.json similarity index 100% rename from samples/AnomalyDetector/src/examples/v1.1/GetResult.json rename to samples/AnomalyDetector/examples/v1.1/GetResult.json diff --git a/samples/AnomalyDetector/src/examples/v1.1/LastDetect.json b/samples/AnomalyDetector/examples/v1.1/LastDetect.json similarity index 99% rename from samples/AnomalyDetector/src/examples/v1.1/LastDetect.json rename to samples/AnomalyDetector/examples/v1.1/LastDetect.json index ebc05dca98f..db24b8b570d 100644 --- a/samples/AnomalyDetector/src/examples/v1.1/LastDetect.json +++ b/samples/AnomalyDetector/examples/v1.1/LastDetect.json @@ -6,7 +6,7 @@ "ApiVersion": "v1.1", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", - "body": { + "options": { "series": [ { "timestamp": "1972-01-01T00:00:00Z", diff --git a/samples/AnomalyDetector/src/examples/v1.1/LastDetectAnomaly.json b/samples/AnomalyDetector/examples/v1.1/LastDetectAnomaly.json similarity index 99% rename from samples/AnomalyDetector/src/examples/v1.1/LastDetectAnomaly.json rename to samples/AnomalyDetector/examples/v1.1/LastDetectAnomaly.json index 09c4992dd22..f5bb920b59e 100644 --- a/samples/AnomalyDetector/src/examples/v1.1/LastDetectAnomaly.json +++ b/samples/AnomalyDetector/examples/v1.1/LastDetectAnomaly.json @@ -7,7 +7,7 @@ "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "modelId": "45aad126-aafd-11ea-b8fb-d89ef3400c5f", - "body": { + "options": { "variables": [ { "variable": "Variable_1", diff --git a/samples/AnomalyDetector/src/examples/v1.1/ListModel.json b/samples/AnomalyDetector/examples/v1.1/ListModel.json similarity index 100% rename from samples/AnomalyDetector/src/examples/v1.1/ListModel.json rename to samples/AnomalyDetector/examples/v1.1/ListModel.json diff --git a/samples/AnomalyDetector/src/examples/v1.1/TrainModel.json b/samples/AnomalyDetector/examples/v1.1/TrainModel.json similarity index 98% rename from samples/AnomalyDetector/src/examples/v1.1/TrainModel.json rename to samples/AnomalyDetector/examples/v1.1/TrainModel.json index 234215b723c..eecf82d7174 100644 --- a/samples/AnomalyDetector/src/examples/v1.1/TrainModel.json +++ b/samples/AnomalyDetector/examples/v1.1/TrainModel.json @@ -6,7 +6,7 @@ "ApiVersion": "v1.1", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", - "body": { + "modelInfo": { "slidingWindow": 20, "alignPolicy": { "alignMode": "Outer", diff --git a/samples/AnomalyDetector/src/Generated/Docs/Multivariate.xml b/samples/AnomalyDetector/src/Generated/Docs/Multivariate.xml index 3afe1ab7696..8e1f000fa10 100644 --- a/samples/AnomalyDetector/src/Generated/Docs/Multivariate.xml +++ b/samples/AnomalyDetector/src/Generated/Docs/Multivariate.xml @@ -5,190 +5,82 @@ This sample shows how to call GetMultivariateBatchDetectionResultAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); -Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); -]]> -This sample shows how to call GetMultivariateBatchDetectionResultAsync with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - -Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); +Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.Parse("663884e6-b117-11ea-b3de-0242ac130004")); ]]> This sample shows how to call GetMultivariateBatchDetectionResult. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); -Response response = client.GetMultivariateBatchDetectionResult(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); -]]> -This sample shows how to call GetMultivariateBatchDetectionResult with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - -Response response = client.GetMultivariateBatchDetectionResult(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); +Response response = client.GetMultivariateBatchDetectionResult(Guid.Parse("663884e6-b117-11ea-b3de-0242ac130004")); ]]> This sample shows how to call GetMultivariateBatchDetectionResultAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - -Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("resultId").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("dataSource").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("topContributorCount").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("timestamp").ToString()); -]]> -This sample shows how to call GetMultivariateBatchDetectionResultAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); -Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); +Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.Parse("663884e6-b117-11ea-b3de-0242ac130004"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resultId").ToString()); Console.WriteLine(result.GetProperty("summary").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("errors")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("errors")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("variable").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("dataSource").ToString()); Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("topContributorCount").ToString()); Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("endTime").ToString()); Console.WriteLine(result.GetProperty("results")[0].GetProperty("timestamp").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("isAnomaly").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("severity").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("score").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("variable").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("contributionScore").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("correlationChanges").GetProperty("changedVariables")[0].ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("message").ToString()); ]]> This sample shows how to call GetMultivariateBatchDetectionResult and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - -Response response = client.GetMultivariateBatchDetectionResult(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("resultId").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("dataSource").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("topContributorCount").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("timestamp").ToString()); -]]> -This sample shows how to call GetMultivariateBatchDetectionResult with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); -Response response = client.GetMultivariateBatchDetectionResult(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); +Response response = client.GetMultivariateBatchDetectionResult(Guid.Parse("663884e6-b117-11ea-b3de-0242ac130004"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resultId").ToString()); Console.WriteLine(result.GetProperty("summary").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("errors")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("errors")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("variable").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("dataSource").ToString()); Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("topContributorCount").ToString()); Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("endTime").ToString()); Console.WriteLine(result.GetProperty("results")[0].GetProperty("timestamp").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("isAnomaly").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("severity").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("score").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("variable").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("contributionScore").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("correlationChanges").GetProperty("changedVariables")[0].ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("message").ToString()); ]]> This sample shows how to call TrainMultivariateModelAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - -ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); -Response response = await client.TrainMultivariateModelAsync(modelInfo); -]]> -This sample shows how to call TrainMultivariateModelAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); -ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")) +ModelInfo modelInfo = new ModelInfo("https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", DateTimeOffset.Parse("2019-04-01T00:00:00Z"), DateTimeOffset.Parse("2019-04-02T00:00:00Z")) { DataSchema = DataSchema.OneTable, - DisplayName = "", - SlidingWindow = 1234, + DisplayName = "Devops-MultiAD", + SlidingWindow = 20, AlignPolicy = new AlignPolicy { - AlignMode = AlignMode.Inner, - FillNAMethod = FillNAMethod.Previous, - PaddingValue = 123.45F, - }, - Status = ModelStatus.Created, - DiagnosticsInfo = new DiagnosticsInfo - { - ModelState = new ModelState - { - EpochIds = { 1234 }, - TrainLosses = { 123.45F }, - ValidationLosses = { 123.45F }, - LatenciesInSeconds = { 123.45F }, - }, - VariableStates = {new VariableState - { - Variable = "", - FilledNARatio = 123.45F, - EffectiveCount = 1234, - FirstTimestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - LastTimestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - }}, + AlignMode = AlignMode.Outer, + FillNAMethod = FillNAMethod.Linear, + PaddingValue = 0, }, }; Response response = await client.TrainMultivariateModelAsync(modelInfo); @@ -198,48 +90,20 @@ Response response = await client.TrainMultivariateModelAs This sample shows how to call TrainMultivariateModel. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - -ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); -Response response = client.TrainMultivariateModel(modelInfo); -]]> -This sample shows how to call TrainMultivariateModel with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); -ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")) +ModelInfo modelInfo = new ModelInfo("https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", DateTimeOffset.Parse("2019-04-01T00:00:00Z"), DateTimeOffset.Parse("2019-04-02T00:00:00Z")) { DataSchema = DataSchema.OneTable, - DisplayName = "", - SlidingWindow = 1234, + DisplayName = "Devops-MultiAD", + SlidingWindow = 20, AlignPolicy = new AlignPolicy { - AlignMode = AlignMode.Inner, - FillNAMethod = FillNAMethod.Previous, - PaddingValue = 123.45F, - }, - Status = ModelStatus.Created, - DiagnosticsInfo = new DiagnosticsInfo - { - ModelState = new ModelState - { - EpochIds = { 1234 }, - TrainLosses = { 123.45F }, - ValidationLosses = { 123.45F }, - LatenciesInSeconds = { 123.45F }, - }, - VariableStates = {new VariableState - { - Variable = "", - FilledNARatio = 123.45F, - EffectiveCount = 1234, - FirstTimestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - LastTimestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - }}, + AlignMode = AlignMode.Outer, + FillNAMethod = FillNAMethod.Linear, + PaddingValue = 0, }, }; Response response = client.TrainMultivariateModel(modelInfo); @@ -249,77 +113,24 @@ Response response = client.TrainMultivariateModel(modelIn This sample shows how to call TrainMultivariateModelAsync and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); using RequestContent content = RequestContent.Create(new { - dataSource = "", - startTime = "2022-05-10T18:57:31.2311892Z", - endTime = "2022-05-10T18:57:31.2311892Z", -}); -Response response = await client.TrainMultivariateModelAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("createdTime").ToString()); -Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); -]]> -This sample shows how to call TrainMultivariateModelAsync with all request content and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - -using RequestContent content = RequestContent.Create(new -{ - dataSource = "", - dataSchema = "OneTable", - startTime = "2022-05-10T18:57:31.2311892Z", - endTime = "2022-05-10T18:57:31.2311892Z", - displayName = "", - slidingWindow = 1234, + slidingWindow = 20, alignPolicy = new { - alignMode = "Inner", - fillNAMethod = "Previous", - paddingValue = 123.45F, - }, - status = "CREATED", - diagnosticsInfo = new - { - modelState = new - { - epochIds = new object[] - { - 1234 - }, - trainLosses = new object[] - { - 123.45F - }, - validationLosses = new object[] - { - 123.45F - }, - latenciesInSeconds = new object[] - { - 123.45F - }, - }, - variableStates = new object[] - { - new - { - variable = "", - filledNARatio = 123.45F, - effectiveCount = 1234, - firstTimestamp = "2022-05-10T18:57:31.2311892Z", - lastTimestamp = "2022-05-10T18:57:31.2311892Z", - } - }, + alignMode = "Outer", + fillNAMethod = "Linear", + paddingValue = 0, }, + dataSource = "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", + dataSchema = "OneTable", + startTime = "2019-04-01T00:00:00Z", + endTime = "2019-04-02T00:00:00Z", + displayName = "Devops-MultiAD", }); Response response = await client.TrainMultivariateModelAsync(content); @@ -327,104 +138,30 @@ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("createdTime").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSource").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSchema").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("slidingWindow").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("alignMode").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("fillNAMethod").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("paddingValue").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("epochIds")[0].ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("trainLosses")[0].ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("validationLosses")[0].ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("latenciesInSeconds")[0].ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("variable").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); ]]> This sample shows how to call TrainMultivariateModel and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - -using RequestContent content = RequestContent.Create(new -{ - dataSource = "", - startTime = "2022-05-10T18:57:31.2311892Z", - endTime = "2022-05-10T18:57:31.2311892Z", -}); -Response response = client.TrainMultivariateModel(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("createdTime").ToString()); -Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); -]]> -This sample shows how to call TrainMultivariateModel with all request content and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); using RequestContent content = RequestContent.Create(new { - dataSource = "", - dataSchema = "OneTable", - startTime = "2022-05-10T18:57:31.2311892Z", - endTime = "2022-05-10T18:57:31.2311892Z", - displayName = "", - slidingWindow = 1234, + slidingWindow = 20, alignPolicy = new { - alignMode = "Inner", - fillNAMethod = "Previous", - paddingValue = 123.45F, - }, - status = "CREATED", - diagnosticsInfo = new - { - modelState = new - { - epochIds = new object[] - { - 1234 - }, - trainLosses = new object[] - { - 123.45F - }, - validationLosses = new object[] - { - 123.45F - }, - latenciesInSeconds = new object[] - { - 123.45F - }, - }, - variableStates = new object[] - { - new - { - variable = "", - filledNARatio = 123.45F, - effectiveCount = 1234, - firstTimestamp = "2022-05-10T18:57:31.2311892Z", - lastTimestamp = "2022-05-10T18:57:31.2311892Z", - } - }, + alignMode = "Outer", + fillNAMethod = "Linear", + paddingValue = 0, }, + dataSource = "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", + dataSchema = "OneTable", + startTime = "2019-04-01T00:00:00Z", + endTime = "2019-04-02T00:00:00Z", + displayName = "Devops-MultiAD", }); Response response = client.TrainMultivariateModel(content); @@ -432,48 +169,17 @@ JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("createdTime").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSource").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSchema").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("slidingWindow").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("alignMode").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("fillNAMethod").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("paddingValue").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("epochIds")[0].ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("trainLosses")[0].ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("validationLosses")[0].ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("latenciesInSeconds")[0].ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("variable").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); ]]> This sample shows how to call DeleteMultivariateModelAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - -Response response = await client.DeleteMultivariateModelAsync(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteMultivariateModelAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); -Response response = await client.DeleteMultivariateModelAsync(""); +Response response = await client.DeleteMultivariateModelAsync("45aad126-aafd-11ea-b8fb-d89ef3400c5f"); Console.WriteLine(response.Status); ]]> @@ -482,21 +188,11 @@ Console.WriteLine(response.Status); This sample shows how to call DeleteMultivariateModel. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - -Response response = client.DeleteMultivariateModel(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteMultivariateModel with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); -Response response = client.DeleteMultivariateModel(""); +Response response = client.DeleteMultivariateModel("45aad126-aafd-11ea-b8fb-d89ef3400c5f"); Console.WriteLine(response.Status); ]]> @@ -505,373 +201,173 @@ Console.WriteLine(response.Status); This sample shows how to call GetMultivariateModelAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); -Response response = await client.GetMultivariateModelAsync(""); -]]> -This sample shows how to call GetMultivariateModelAsync with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - -Response response = await client.GetMultivariateModelAsync(""); +Response response = await client.GetMultivariateModelAsync("45aad126-aafd-11ea-b8fb-d89ef3400c5f"); ]]> This sample shows how to call GetMultivariateModel. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); -Response response = client.GetMultivariateModel(""); -]]> -This sample shows how to call GetMultivariateModel with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - -Response response = client.GetMultivariateModel(""); +Response response = client.GetMultivariateModel("45aad126-aafd-11ea-b8fb-d89ef3400c5f"); ]]> This sample shows how to call GetMultivariateModelAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - -Response response = await client.GetMultivariateModelAsync("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("createdTime").ToString()); -Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); -]]> -This sample shows how to call GetMultivariateModelAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); -Response response = await client.GetMultivariateModelAsync("", null); +Response response = await client.GetMultivariateModelAsync("45aad126-aafd-11ea-b8fb-d89ef3400c5f", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("createdTime").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSource").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSchema").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("slidingWindow").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("alignMode").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("fillNAMethod").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("paddingValue").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("epochIds")[0].ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("trainLosses")[0].ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("validationLosses")[0].ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("latenciesInSeconds")[0].ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("variable").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); ]]> This sample shows how to call GetMultivariateModel and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - -Response response = client.GetMultivariateModel("", null); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("modelId").ToString()); -Console.WriteLine(result.GetProperty("createdTime").ToString()); -Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); -]]> -This sample shows how to call GetMultivariateModel with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); -Response response = client.GetMultivariateModel("", null); +Response response = client.GetMultivariateModel("45aad126-aafd-11ea-b8fb-d89ef3400c5f", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("createdTime").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSource").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSchema").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("displayName").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("slidingWindow").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("alignMode").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("fillNAMethod").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("paddingValue").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("epochIds")[0].ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("trainLosses")[0].ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("validationLosses")[0].ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("latenciesInSeconds")[0].ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("variable").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); -Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); ]]> This sample shows how to call DetectMultivariateBatchAnomalyAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - -MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); -Response response = await client.DetectMultivariateBatchAnomalyAsync("", options); -]]> -This sample shows how to call DetectMultivariateBatchAnomalyAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); -MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); -Response response = await client.DetectMultivariateBatchAnomalyAsync("", options); +MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv"), 10, DateTimeOffset.Parse("2019-04-01T00:15:00Z"), DateTimeOffset.Parse("2019-04-01T00:40:00Z")); +Response response = await client.DetectMultivariateBatchAnomalyAsync("45aad126-aafd-11ea-b8fb-d89ef3400c5f", options); ]]> This sample shows how to call DetectMultivariateBatchAnomaly. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); -MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); -Response response = client.DetectMultivariateBatchAnomaly("", options); -]]> -This sample shows how to call DetectMultivariateBatchAnomaly with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - -MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); -Response response = client.DetectMultivariateBatchAnomaly("", options); +MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv"), 10, DateTimeOffset.Parse("2019-04-01T00:15:00Z"), DateTimeOffset.Parse("2019-04-01T00:40:00Z")); +Response response = client.DetectMultivariateBatchAnomaly("45aad126-aafd-11ea-b8fb-d89ef3400c5f", options); ]]> This sample shows how to call DetectMultivariateBatchAnomalyAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - -using RequestContent content = RequestContent.Create(new -{ - dataSource = "http://localhost:3000", - topContributorCount = 1234, - startTime = "2022-05-10T18:57:31.2311892Z", - endTime = "2022-05-10T18:57:31.2311892Z", -}); -Response response = await client.DetectMultivariateBatchAnomalyAsync("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("resultId").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("dataSource").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("topContributorCount").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("timestamp").ToString()); -]]> -This sample shows how to call DetectMultivariateBatchAnomalyAsync with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); using RequestContent content = RequestContent.Create(new { - dataSource = "http://localhost:3000", - topContributorCount = 1234, - startTime = "2022-05-10T18:57:31.2311892Z", - endTime = "2022-05-10T18:57:31.2311892Z", + dataSource = "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", + topContributorCount = 10, + startTime = "2019-04-01T00:15:00Z", + endTime = "2019-04-01T00:40:00Z", }); -Response response = await client.DetectMultivariateBatchAnomalyAsync("", content); +Response response = await client.DetectMultivariateBatchAnomalyAsync("45aad126-aafd-11ea-b8fb-d89ef3400c5f", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resultId").ToString()); Console.WriteLine(result.GetProperty("summary").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("errors")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("errors")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("variable").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("dataSource").ToString()); Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("topContributorCount").ToString()); Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("endTime").ToString()); Console.WriteLine(result.GetProperty("results")[0].GetProperty("timestamp").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("isAnomaly").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("severity").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("score").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("variable").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("contributionScore").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("correlationChanges").GetProperty("changedVariables")[0].ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("message").ToString()); ]]> This sample shows how to call DetectMultivariateBatchAnomaly and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - -using RequestContent content = RequestContent.Create(new -{ - dataSource = "http://localhost:3000", - topContributorCount = 1234, - startTime = "2022-05-10T18:57:31.2311892Z", - endTime = "2022-05-10T18:57:31.2311892Z", -}); -Response response = client.DetectMultivariateBatchAnomaly("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("resultId").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("dataSource").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("topContributorCount").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("startTime").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("endTime").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("timestamp").ToString()); -]]> -This sample shows how to call DetectMultivariateBatchAnomaly with all parameters and request content and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); using RequestContent content = RequestContent.Create(new { - dataSource = "http://localhost:3000", - topContributorCount = 1234, - startTime = "2022-05-10T18:57:31.2311892Z", - endTime = "2022-05-10T18:57:31.2311892Z", + dataSource = "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", + topContributorCount = 10, + startTime = "2019-04-01T00:15:00Z", + endTime = "2019-04-01T00:40:00Z", }); -Response response = client.DetectMultivariateBatchAnomaly("", content); +Response response = client.DetectMultivariateBatchAnomaly("45aad126-aafd-11ea-b8fb-d89ef3400c5f", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resultId").ToString()); Console.WriteLine(result.GetProperty("summary").GetProperty("status").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("errors")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("errors")[0].GetProperty("message").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("variable").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); -Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("dataSource").ToString()); Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("topContributorCount").ToString()); Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("startTime").ToString()); Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("endTime").ToString()); Console.WriteLine(result.GetProperty("results")[0].GetProperty("timestamp").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("isAnomaly").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("severity").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("score").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("variable").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("contributionScore").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("correlationChanges").GetProperty("changedVariables")[0].ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("message").ToString()); ]]> This sample shows how to call DetectMultivariateLastAnomalyAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - -MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new VariableValues[] -{ - new VariableValues("", new string[]{""}, new float[]{123.45F}) -}, 1234); -Response response = await client.DetectMultivariateLastAnomalyAsync("", options); -]]> -This sample shows how to call DetectMultivariateLastAnomalyAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new VariableValues[] { - new VariableValues("", new string[]{""}, new float[]{123.45F}) -}, 1234); -Response response = await client.DetectMultivariateLastAnomalyAsync("", options); + new VariableValues("Variable_1", new string[]{"2021-01-01T00:00:00Z", "2021-01-01T00:01:00Z", "2021-01-01T00:02:00Z", "2021-01-01T00:03:00Z", "2021-01-01T00:04:00Z", "2021-01-01T00:05:00Z", "2021-01-01T00:06:00Z", "2021-01-01T00:07:00Z", "2021-01-01T00:08:00Z", "2021-01-01T00:09:00Z", "2021-01-01T00:10:00Z", "2021-01-01T00:11:00Z", "2021-01-01T00:12:00Z", "2021-01-01T00:13:00Z", "2021-01-01T00:14:00Z", "2021-01-01T00:15:00Z", "2021-01-01T00:16:00Z", "2021-01-01T00:17:00Z", "2021-01-01T00:18:00Z", "2021-01-01T00:19:00Z", "2021-01-01T00:20:00Z", "2021-01-01T00:21:00Z", "2021-01-01T00:22:00Z", "2021-01-01T00:23:00Z", "2021-01-01T00:24:00Z", "2021-01-01T00:25:00Z", "2021-01-01T00:26:00Z", "2021-01-01T00:27:00Z", "2021-01-01T00:28:00Z", "2021-01-01T00:29:00Z"}, new float[]{(float)0.4551378545933972, (float)0.7388603950488748, (float)0.201088255984052, (float)0.7462812245891899, (float)0.07308128850401663, (float)0.33090474587393537, (float)0.7544925268153315, (float)0.987506336316328, (float)0.6665932993421468, (float)0.6308351543168672, (float)0.08083310161466228, (float)0.8414415588668442, (float)0.514583545640453, (float)0.0954489875193526, (float)0.7786793231920507, (float)0.41646133667960994, (float)0.030176187583339287, (float)0.3474214937189324, (float)0.508530173413991, (float)0.42451199127255046, (float)0.2115944222725208, (float)0.24733519545833516, (float)0.8791022110982156, (float)0.9479621899884665, (float)0.26702703121252136, (float)0.6954503497669413, (float)0.1235728391488995, (float)0.8214915473050647, (float)0.11813002444192677, (float)0.8579045951076123}), + new VariableValues("Variable_2", new string[]{"2021-01-01T00:00:00Z", "2021-01-01T00:01:00Z", "2021-01-01T00:02:00Z", "2021-01-01T00:03:00Z", "2021-01-01T00:04:00Z", "2021-01-01T00:05:00Z", "2021-01-01T00:06:00Z", "2021-01-01T00:07:00Z", "2021-01-01T00:08:00Z", "2021-01-01T00:09:00Z", "2021-01-01T00:10:00Z", "2021-01-01T00:11:00Z", "2021-01-01T00:12:00Z", "2021-01-01T00:13:00Z", "2021-01-01T00:14:00Z", "2021-01-01T00:15:00Z", "2021-01-01T00:16:00Z", "2021-01-01T00:17:00Z", "2021-01-01T00:18:00Z", "2021-01-01T00:19:00Z", "2021-01-01T00:20:00Z", "2021-01-01T00:21:00Z", "2021-01-01T00:22:00Z", "2021-01-01T00:23:00Z", "2021-01-01T00:24:00Z", "2021-01-01T00:25:00Z", "2021-01-01T00:26:00Z", "2021-01-01T00:27:00Z", "2021-01-01T00:28:00Z", "2021-01-01T00:29:00Z"}, new float[]{(float)0.9617871613964145, (float)0.24903311574778408, (float)0.4920561254118613, (float)0.9895601049618598, (float)0.9171759283128094, (float)0.5754204711105273, (float)0.1811033296265634, (float)0.8852311981742577, (float)0.9543231904644779, (float)0.7088012446094262, (float)0.7843572237149014, (float)0.7664787010700046, (float)0.3699552325387093, (float)0.504519908266789, (float)0.5848930929950164, (float)0.7628913396089576, (float)0.8148405868900065, (float)0.08540458873739332, (float)0.03481976727525682, (float)0.21275099339467762, (float)0.9836175579199806, (float)0.9321441483364282, (float)0.038466608085469534, (float)0.1723138437622782, (float)0.8626383410218382, (float)0.35053229974224254, (float)0.631141662835182, (float)0.0730352607990088, (float)0.08886179043386, (float)0.7488606040971179}), + new VariableValues("Variable_3", new string[]{"2021-01-01T00:00:00Z", "2021-01-01T00:01:00Z", "2021-01-01T00:02:00Z", "2021-01-01T00:03:00Z", "2021-01-01T00:04:00Z", "2021-01-01T00:05:00Z", "2021-01-01T00:06:00Z", "2021-01-01T00:07:00Z", "2021-01-01T00:08:00Z", "2021-01-01T00:09:00Z", "2021-01-01T00:10:00Z", "2021-01-01T00:11:00Z", "2021-01-01T00:12:00Z", "2021-01-01T00:13:00Z", "2021-01-01T00:14:00Z", "2021-01-01T00:15:00Z", "2021-01-01T00:16:00Z", "2021-01-01T00:17:00Z", "2021-01-01T00:18:00Z", "2021-01-01T00:19:00Z", "2021-01-01T00:20:00Z", "2021-01-01T00:21:00Z", "2021-01-01T00:22:00Z", "2021-01-01T00:23:00Z", "2021-01-01T00:24:00Z", "2021-01-01T00:25:00Z", "2021-01-01T00:26:00Z", "2021-01-01T00:27:00Z", "2021-01-01T00:28:00Z", "2021-01-01T00:29:00Z"}, new float[]{(float)0.4030756879437628, (float)0.15526889968448554, (float)0.36352226408981103, (float)0.6051200637229004, (float)0.8516795018476276, (float)0.2645605735279929, (float)0.6810875830037345, (float)0.9165894221681316, (float)0.700783245230424, (float)0.5624155469940331, (float)0.6277289685127893, (float)0.15992056539730204, (float)0.6020964482827594, (float)0.35937967753105915, (float)0.8731686034848609, (float)0.20301549117588935, (float)0.029261872151168933, (float)0.6261499548828445, (float)0.45850782028563386, (float)0.8275006940083313, (float)0.032760268834037376, (float)0.4485202784055029, (float)0.8915691008748384, (float)0.891669051517807, (float)0.9469979353323046, (float)0.115293087370132, (float)0.08818772518459506, (float)0.7426286620589166, (float)0.32372247468990756, (float)0.936268139507417}) +}, 10); +Response response = await client.DetectMultivariateLastAnomalyAsync("45aad126-aafd-11ea-b8fb-d89ef3400c5f", options); ]]> This sample shows how to call DetectMultivariateLastAnomaly. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new VariableValues[] { - new VariableValues("", new string[]{""}, new float[]{123.45F}) -}, 1234); -Response response = client.DetectMultivariateLastAnomaly("", options); -]]> -This sample shows how to call DetectMultivariateLastAnomaly with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - -MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new VariableValues[] -{ - new VariableValues("", new string[]{""}, new float[]{123.45F}) -}, 1234); -Response response = client.DetectMultivariateLastAnomaly("", options); + new VariableValues("Variable_1", new string[]{"2021-01-01T00:00:00Z", "2021-01-01T00:01:00Z", "2021-01-01T00:02:00Z", "2021-01-01T00:03:00Z", "2021-01-01T00:04:00Z", "2021-01-01T00:05:00Z", "2021-01-01T00:06:00Z", "2021-01-01T00:07:00Z", "2021-01-01T00:08:00Z", "2021-01-01T00:09:00Z", "2021-01-01T00:10:00Z", "2021-01-01T00:11:00Z", "2021-01-01T00:12:00Z", "2021-01-01T00:13:00Z", "2021-01-01T00:14:00Z", "2021-01-01T00:15:00Z", "2021-01-01T00:16:00Z", "2021-01-01T00:17:00Z", "2021-01-01T00:18:00Z", "2021-01-01T00:19:00Z", "2021-01-01T00:20:00Z", "2021-01-01T00:21:00Z", "2021-01-01T00:22:00Z", "2021-01-01T00:23:00Z", "2021-01-01T00:24:00Z", "2021-01-01T00:25:00Z", "2021-01-01T00:26:00Z", "2021-01-01T00:27:00Z", "2021-01-01T00:28:00Z", "2021-01-01T00:29:00Z"}, new float[]{(float)0.4551378545933972, (float)0.7388603950488748, (float)0.201088255984052, (float)0.7462812245891899, (float)0.07308128850401663, (float)0.33090474587393537, (float)0.7544925268153315, (float)0.987506336316328, (float)0.6665932993421468, (float)0.6308351543168672, (float)0.08083310161466228, (float)0.8414415588668442, (float)0.514583545640453, (float)0.0954489875193526, (float)0.7786793231920507, (float)0.41646133667960994, (float)0.030176187583339287, (float)0.3474214937189324, (float)0.508530173413991, (float)0.42451199127255046, (float)0.2115944222725208, (float)0.24733519545833516, (float)0.8791022110982156, (float)0.9479621899884665, (float)0.26702703121252136, (float)0.6954503497669413, (float)0.1235728391488995, (float)0.8214915473050647, (float)0.11813002444192677, (float)0.8579045951076123}), + new VariableValues("Variable_2", new string[]{"2021-01-01T00:00:00Z", "2021-01-01T00:01:00Z", "2021-01-01T00:02:00Z", "2021-01-01T00:03:00Z", "2021-01-01T00:04:00Z", "2021-01-01T00:05:00Z", "2021-01-01T00:06:00Z", "2021-01-01T00:07:00Z", "2021-01-01T00:08:00Z", "2021-01-01T00:09:00Z", "2021-01-01T00:10:00Z", "2021-01-01T00:11:00Z", "2021-01-01T00:12:00Z", "2021-01-01T00:13:00Z", "2021-01-01T00:14:00Z", "2021-01-01T00:15:00Z", "2021-01-01T00:16:00Z", "2021-01-01T00:17:00Z", "2021-01-01T00:18:00Z", "2021-01-01T00:19:00Z", "2021-01-01T00:20:00Z", "2021-01-01T00:21:00Z", "2021-01-01T00:22:00Z", "2021-01-01T00:23:00Z", "2021-01-01T00:24:00Z", "2021-01-01T00:25:00Z", "2021-01-01T00:26:00Z", "2021-01-01T00:27:00Z", "2021-01-01T00:28:00Z", "2021-01-01T00:29:00Z"}, new float[]{(float)0.9617871613964145, (float)0.24903311574778408, (float)0.4920561254118613, (float)0.9895601049618598, (float)0.9171759283128094, (float)0.5754204711105273, (float)0.1811033296265634, (float)0.8852311981742577, (float)0.9543231904644779, (float)0.7088012446094262, (float)0.7843572237149014, (float)0.7664787010700046, (float)0.3699552325387093, (float)0.504519908266789, (float)0.5848930929950164, (float)0.7628913396089576, (float)0.8148405868900065, (float)0.08540458873739332, (float)0.03481976727525682, (float)0.21275099339467762, (float)0.9836175579199806, (float)0.9321441483364282, (float)0.038466608085469534, (float)0.1723138437622782, (float)0.8626383410218382, (float)0.35053229974224254, (float)0.631141662835182, (float)0.0730352607990088, (float)0.08886179043386, (float)0.7488606040971179}), + new VariableValues("Variable_3", new string[]{"2021-01-01T00:00:00Z", "2021-01-01T00:01:00Z", "2021-01-01T00:02:00Z", "2021-01-01T00:03:00Z", "2021-01-01T00:04:00Z", "2021-01-01T00:05:00Z", "2021-01-01T00:06:00Z", "2021-01-01T00:07:00Z", "2021-01-01T00:08:00Z", "2021-01-01T00:09:00Z", "2021-01-01T00:10:00Z", "2021-01-01T00:11:00Z", "2021-01-01T00:12:00Z", "2021-01-01T00:13:00Z", "2021-01-01T00:14:00Z", "2021-01-01T00:15:00Z", "2021-01-01T00:16:00Z", "2021-01-01T00:17:00Z", "2021-01-01T00:18:00Z", "2021-01-01T00:19:00Z", "2021-01-01T00:20:00Z", "2021-01-01T00:21:00Z", "2021-01-01T00:22:00Z", "2021-01-01T00:23:00Z", "2021-01-01T00:24:00Z", "2021-01-01T00:25:00Z", "2021-01-01T00:26:00Z", "2021-01-01T00:27:00Z", "2021-01-01T00:28:00Z", "2021-01-01T00:29:00Z"}, new float[]{(float)0.4030756879437628, (float)0.15526889968448554, (float)0.36352226408981103, (float)0.6051200637229004, (float)0.8516795018476276, (float)0.2645605735279929, (float)0.6810875830037345, (float)0.9165894221681316, (float)0.700783245230424, (float)0.5624155469940331, (float)0.6277289685127893, (float)0.15992056539730204, (float)0.6020964482827594, (float)0.35937967753105915, (float)0.8731686034848609, (float)0.20301549117588935, (float)0.029261872151168933, (float)0.6261499548828445, (float)0.45850782028563386, (float)0.8275006940083313, (float)0.032760268834037376, (float)0.4485202784055029, (float)0.8915691008748384, (float)0.891669051517807, (float)0.9469979353323046, (float)0.115293087370132, (float)0.08818772518459506, (float)0.7426286620589166, (float)0.32372247468990756, (float)0.936268139507417}) +}, 10); +Response response = client.DetectMultivariateLastAnomaly("45aad126-aafd-11ea-b8fb-d89ef3400c5f", options); ]]> This sample shows how to call DetectMultivariateLastAnomalyAsync and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); @@ -881,73 +377,228 @@ using RequestContent content = RequestContent.Create(new { new { - variable = "", + variable = "Variable_1", timestamps = new object[] { - "" + "2021-01-01T00:00:00Z", + "2021-01-01T00:01:00Z", + "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", + "2021-01-01T00:04:00Z", + "2021-01-01T00:05:00Z", + "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", + "2021-01-01T00:08:00Z", + "2021-01-01T00:09:00Z", + "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", + "2021-01-01T00:12:00Z", + "2021-01-01T00:13:00Z", + "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", + "2021-01-01T00:16:00Z", + "2021-01-01T00:17:00Z", + "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", + "2021-01-01T00:20:00Z", + "2021-01-01T00:21:00Z", + "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", + "2021-01-01T00:24:00Z", + "2021-01-01T00:25:00Z", + "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", + "2021-01-01T00:28:00Z", + "2021-01-01T00:29:00Z" }, values = new object[] { - 123.45F + 0.4551378545933972, + 0.7388603950488748, + 0.201088255984052, + 0.7462812245891899, + 0.07308128850401663, + 0.33090474587393537, + 0.7544925268153315, + 0.987506336316328, + 0.6665932993421468, + 0.6308351543168672, + 0.08083310161466228, + 0.8414415588668442, + 0.514583545640453, + 0.0954489875193526, + 0.7786793231920507, + 0.41646133667960994, + 0.030176187583339287, + 0.3474214937189324, + 0.508530173413991, + 0.42451199127255046, + 0.2115944222725208, + 0.24733519545833516, + 0.8791022110982156, + 0.9479621899884665, + 0.26702703121252136, + 0.6954503497669413, + 0.1235728391488995, + 0.8214915473050647, + 0.11813002444192677, + 0.8579045951076123 }, - } - }, - topContributorCount = 1234, -}); -Response response = await client.DetectMultivariateLastAnomalyAsync("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call DetectMultivariateLastAnomalyAsync with all parameters and request content and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - -using RequestContent content = RequestContent.Create(new -{ - variables = new object[] - { + }, + new + { + variable = "Variable_2", + timestamps = new object[] + { + "2021-01-01T00:00:00Z", + "2021-01-01T00:01:00Z", + "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", + "2021-01-01T00:04:00Z", + "2021-01-01T00:05:00Z", + "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", + "2021-01-01T00:08:00Z", + "2021-01-01T00:09:00Z", + "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", + "2021-01-01T00:12:00Z", + "2021-01-01T00:13:00Z", + "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", + "2021-01-01T00:16:00Z", + "2021-01-01T00:17:00Z", + "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", + "2021-01-01T00:20:00Z", + "2021-01-01T00:21:00Z", + "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", + "2021-01-01T00:24:00Z", + "2021-01-01T00:25:00Z", + "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", + "2021-01-01T00:28:00Z", + "2021-01-01T00:29:00Z" + }, + values = new object[] + { + 0.9617871613964145, + 0.24903311574778408, + 0.4920561254118613, + 0.9895601049618598, + 0.9171759283128094, + 0.5754204711105273, + 0.1811033296265634, + 0.8852311981742577, + 0.9543231904644779, + 0.7088012446094262, + 0.7843572237149014, + 0.7664787010700046, + 0.3699552325387093, + 0.504519908266789, + 0.5848930929950164, + 0.7628913396089576, + 0.8148405868900065, + 0.08540458873739332, + 0.03481976727525682, + 0.21275099339467762, + 0.9836175579199806, + 0.9321441483364282, + 0.038466608085469534, + 0.1723138437622782, + 0.8626383410218382, + 0.35053229974224254, + 0.631141662835182, + 0.0730352607990088, + 0.08886179043386, + 0.7488606040971179 + }, + }, new { - variable = "", + variable = "Variable_3", timestamps = new object[] { - "" + "2021-01-01T00:00:00Z", + "2021-01-01T00:01:00Z", + "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", + "2021-01-01T00:04:00Z", + "2021-01-01T00:05:00Z", + "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", + "2021-01-01T00:08:00Z", + "2021-01-01T00:09:00Z", + "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", + "2021-01-01T00:12:00Z", + "2021-01-01T00:13:00Z", + "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", + "2021-01-01T00:16:00Z", + "2021-01-01T00:17:00Z", + "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", + "2021-01-01T00:20:00Z", + "2021-01-01T00:21:00Z", + "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", + "2021-01-01T00:24:00Z", + "2021-01-01T00:25:00Z", + "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", + "2021-01-01T00:28:00Z", + "2021-01-01T00:29:00Z" }, values = new object[] { - 123.45F + 0.4030756879437628, + 0.15526889968448554, + 0.36352226408981103, + 0.6051200637229004, + 0.8516795018476276, + 0.2645605735279929, + 0.6810875830037345, + 0.9165894221681316, + 0.700783245230424, + 0.5624155469940331, + 0.6277289685127893, + 0.15992056539730204, + 0.6020964482827594, + 0.35937967753105915, + 0.8731686034848609, + 0.20301549117588935, + 0.029261872151168933, + 0.6261499548828445, + 0.45850782028563386, + 0.8275006940083313, + 0.032760268834037376, + 0.4485202784055029, + 0.8915691008748384, + 0.891669051517807, + 0.9469979353323046, + 0.115293087370132, + 0.08818772518459506, + 0.7426286620589166, + 0.32372247468990756, + 0.936268139507417 }, } }, - topContributorCount = 1234, + topContributorCount = 10, }); -Response response = await client.DetectMultivariateLastAnomalyAsync("", content); +Response response = await client.DetectMultivariateLastAnomalyAsync("45aad126-aafd-11ea-b8fb-d89ef3400c5f", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("variableStates")[0].GetProperty("variable").ToString()); -Console.WriteLine(result.GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); -Console.WriteLine(result.GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); -Console.WriteLine(result.GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); -Console.WriteLine(result.GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("timestamp").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("isAnomaly").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("severity").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("score").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("variable").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("contributionScore").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("correlationChanges").GetProperty("changedVariables")[0].ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call DetectMultivariateLastAnomaly and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); @@ -957,163 +608,263 @@ using RequestContent content = RequestContent.Create(new { new { - variable = "", + variable = "Variable_1", timestamps = new object[] { - "" + "2021-01-01T00:00:00Z", + "2021-01-01T00:01:00Z", + "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", + "2021-01-01T00:04:00Z", + "2021-01-01T00:05:00Z", + "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", + "2021-01-01T00:08:00Z", + "2021-01-01T00:09:00Z", + "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", + "2021-01-01T00:12:00Z", + "2021-01-01T00:13:00Z", + "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", + "2021-01-01T00:16:00Z", + "2021-01-01T00:17:00Z", + "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", + "2021-01-01T00:20:00Z", + "2021-01-01T00:21:00Z", + "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", + "2021-01-01T00:24:00Z", + "2021-01-01T00:25:00Z", + "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", + "2021-01-01T00:28:00Z", + "2021-01-01T00:29:00Z" }, values = new object[] { - 123.45F + 0.4551378545933972, + 0.7388603950488748, + 0.201088255984052, + 0.7462812245891899, + 0.07308128850401663, + 0.33090474587393537, + 0.7544925268153315, + 0.987506336316328, + 0.6665932993421468, + 0.6308351543168672, + 0.08083310161466228, + 0.8414415588668442, + 0.514583545640453, + 0.0954489875193526, + 0.7786793231920507, + 0.41646133667960994, + 0.030176187583339287, + 0.3474214937189324, + 0.508530173413991, + 0.42451199127255046, + 0.2115944222725208, + 0.24733519545833516, + 0.8791022110982156, + 0.9479621899884665, + 0.26702703121252136, + 0.6954503497669413, + 0.1235728391488995, + 0.8214915473050647, + 0.11813002444192677, + 0.8579045951076123 }, - } - }, - topContributorCount = 1234, -}); -Response response = client.DetectMultivariateLastAnomaly("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call DetectMultivariateLastAnomaly with all parameters and request content and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - -using RequestContent content = RequestContent.Create(new -{ - variables = new object[] - { + }, + new + { + variable = "Variable_2", + timestamps = new object[] + { + "2021-01-01T00:00:00Z", + "2021-01-01T00:01:00Z", + "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", + "2021-01-01T00:04:00Z", + "2021-01-01T00:05:00Z", + "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", + "2021-01-01T00:08:00Z", + "2021-01-01T00:09:00Z", + "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", + "2021-01-01T00:12:00Z", + "2021-01-01T00:13:00Z", + "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", + "2021-01-01T00:16:00Z", + "2021-01-01T00:17:00Z", + "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", + "2021-01-01T00:20:00Z", + "2021-01-01T00:21:00Z", + "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", + "2021-01-01T00:24:00Z", + "2021-01-01T00:25:00Z", + "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", + "2021-01-01T00:28:00Z", + "2021-01-01T00:29:00Z" + }, + values = new object[] + { + 0.9617871613964145, + 0.24903311574778408, + 0.4920561254118613, + 0.9895601049618598, + 0.9171759283128094, + 0.5754204711105273, + 0.1811033296265634, + 0.8852311981742577, + 0.9543231904644779, + 0.7088012446094262, + 0.7843572237149014, + 0.7664787010700046, + 0.3699552325387093, + 0.504519908266789, + 0.5848930929950164, + 0.7628913396089576, + 0.8148405868900065, + 0.08540458873739332, + 0.03481976727525682, + 0.21275099339467762, + 0.9836175579199806, + 0.9321441483364282, + 0.038466608085469534, + 0.1723138437622782, + 0.8626383410218382, + 0.35053229974224254, + 0.631141662835182, + 0.0730352607990088, + 0.08886179043386, + 0.7488606040971179 + }, + }, new { - variable = "", + variable = "Variable_3", timestamps = new object[] { - "" + "2021-01-01T00:00:00Z", + "2021-01-01T00:01:00Z", + "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", + "2021-01-01T00:04:00Z", + "2021-01-01T00:05:00Z", + "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", + "2021-01-01T00:08:00Z", + "2021-01-01T00:09:00Z", + "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", + "2021-01-01T00:12:00Z", + "2021-01-01T00:13:00Z", + "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", + "2021-01-01T00:16:00Z", + "2021-01-01T00:17:00Z", + "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", + "2021-01-01T00:20:00Z", + "2021-01-01T00:21:00Z", + "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", + "2021-01-01T00:24:00Z", + "2021-01-01T00:25:00Z", + "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", + "2021-01-01T00:28:00Z", + "2021-01-01T00:29:00Z" }, values = new object[] { - 123.45F + 0.4030756879437628, + 0.15526889968448554, + 0.36352226408981103, + 0.6051200637229004, + 0.8516795018476276, + 0.2645605735279929, + 0.6810875830037345, + 0.9165894221681316, + 0.700783245230424, + 0.5624155469940331, + 0.6277289685127893, + 0.15992056539730204, + 0.6020964482827594, + 0.35937967753105915, + 0.8731686034848609, + 0.20301549117588935, + 0.029261872151168933, + 0.6261499548828445, + 0.45850782028563386, + 0.8275006940083313, + 0.032760268834037376, + 0.4485202784055029, + 0.8915691008748384, + 0.891669051517807, + 0.9469979353323046, + 0.115293087370132, + 0.08818772518459506, + 0.7426286620589166, + 0.32372247468990756, + 0.936268139507417 }, } }, - topContributorCount = 1234, + topContributorCount = 10, }); -Response response = client.DetectMultivariateLastAnomaly("", content); +Response response = client.DetectMultivariateLastAnomaly("45aad126-aafd-11ea-b8fb-d89ef3400c5f", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("variableStates")[0].GetProperty("variable").ToString()); -Console.WriteLine(result.GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); -Console.WriteLine(result.GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); -Console.WriteLine(result.GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); -Console.WriteLine(result.GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("timestamp").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("isAnomaly").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("severity").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("score").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("variable").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("contributionScore").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("correlationChanges").GetProperty("changedVariables")[0].ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("code").ToString()); -Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("message").ToString()); +Console.WriteLine(result.ToString()); ]]> This sample shows how to call GetMultivariateModelsAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); await foreach (AnomalyDetectionModel item in client.GetMultivariateModelsAsync()) { } -]]> -This sample shows how to call GetMultivariateModelsAsync with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - -await foreach (AnomalyDetectionModel item in client.GetMultivariateModelsAsync(skip: 1234, maxCount: 1234)) -{ -} ]]> This sample shows how to call GetMultivariateModels. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); foreach (AnomalyDetectionModel item in client.GetMultivariateModels()) { } -]]> -This sample shows how to call GetMultivariateModels with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - -foreach (AnomalyDetectionModel item in client.GetMultivariateModels(skip: 1234, maxCount: 1234)) -{ -} ]]> This sample shows how to call GetMultivariateModelsAsync and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - -await foreach (BinaryData item in client.GetMultivariateModelsAsync(null, null, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); -} -]]> -This sample shows how to call GetMultivariateModelsAsync with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); -await foreach (BinaryData item in client.GetMultivariateModelsAsync(1234, 1234, null)) +await foreach (BinaryData item in client.GetMultivariateModelsAsync(0, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("createdTime").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSource").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSchema").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("slidingWindow").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("alignMode").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("fillNAMethod").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("paddingValue").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("epochIds")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("trainLosses")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("validationLosses")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("latenciesInSeconds")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("variable").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); } ]]> @@ -1121,51 +872,16 @@ await foreach (BinaryData item in client.GetMultivariateModelsAsync(1234, 1234, This sample shows how to call GetMultivariateModels and parse the result. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - -foreach (BinaryData item in client.GetMultivariateModels(null, null, null)) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); -} -]]> -This sample shows how to call GetMultivariateModels with all parameters and parse the result. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); -foreach (BinaryData item in client.GetMultivariateModels(1234, 1234, null)) +foreach (BinaryData item in client.GetMultivariateModels(0, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("createdTime").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSource").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSchema").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("slidingWindow").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("alignMode").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("fillNAMethod").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("paddingValue").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("epochIds")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("trainLosses")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("validationLosses")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("latenciesInSeconds")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("variable").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); } ]]> diff --git a/samples/AnomalyDetector/src/Generated/Docs/Univariate.xml b/samples/AnomalyDetector/src/Generated/Docs/Univariate.xml index 3ea14ded47f..2600f93a812 100644 --- a/samples/AnomalyDetector/src/Generated/Docs/Univariate.xml +++ b/samples/AnomalyDetector/src/Generated/Docs/Univariate.xml @@ -5,37 +5,210 @@ This sample shows how to call DetectUnivariateEntireSeriesAsync. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] { - new TimeSeriesPoint(123.45F) -}); -Response response = await client.DetectUnivariateEntireSeriesAsync(options); -]]> -This sample shows how to call DetectUnivariateEntireSeriesAsync with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); - -UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] -{ - new TimeSeriesPoint(123.45F) + new TimeSeriesPoint(826) + { + Timestamp = DateTimeOffset.Parse("1972-01-01T00:00:00Z"), + }, + new TimeSeriesPoint(799) + { + Timestamp = DateTimeOffset.Parse("1972-02-01T00:00:00Z"), + }, + new TimeSeriesPoint(890) + { + Timestamp = DateTimeOffset.Parse("1972-03-01T00:00:00Z"), + }, + new TimeSeriesPoint(900) + { + Timestamp = DateTimeOffset.Parse("1972-04-01T00:00:00Z"), + }, + new TimeSeriesPoint(961) + { + Timestamp = DateTimeOffset.Parse("1972-05-01T00:00:00Z"), + }, + new TimeSeriesPoint(935) + { + Timestamp = DateTimeOffset.Parse("1972-06-01T00:00:00Z"), + }, + new TimeSeriesPoint(894) + { + Timestamp = DateTimeOffset.Parse("1972-07-01T00:00:00Z"), + }, + new TimeSeriesPoint(855) + { + Timestamp = DateTimeOffset.Parse("1972-08-01T00:00:00Z"), + }, + new TimeSeriesPoint(809) + { + Timestamp = DateTimeOffset.Parse("1972-09-01T00:00:00Z"), + }, + new TimeSeriesPoint(810) + { + Timestamp = DateTimeOffset.Parse("1972-10-01T00:00:00Z"), + }, + new TimeSeriesPoint(766) + { + Timestamp = DateTimeOffset.Parse("1972-11-01T00:00:00Z"), + }, + new TimeSeriesPoint(805) + { + Timestamp = DateTimeOffset.Parse("1972-12-01T00:00:00Z"), + }, + new TimeSeriesPoint(821) + { + Timestamp = DateTimeOffset.Parse("1973-01-01T00:00:00Z"), + }, + new TimeSeriesPoint(773) + { + Timestamp = DateTimeOffset.Parse("1973-02-01T00:00:00Z"), + }, + new TimeSeriesPoint(883) + { + Timestamp = DateTimeOffset.Parse("1973-03-01T00:00:00Z"), + }, + new TimeSeriesPoint(898) + { + Timestamp = DateTimeOffset.Parse("1973-04-01T00:00:00Z"), + }, + new TimeSeriesPoint(957) + { + Timestamp = DateTimeOffset.Parse("1973-05-01T00:00:00Z"), + }, + new TimeSeriesPoint(924) + { + Timestamp = DateTimeOffset.Parse("1973-06-01T00:00:00Z"), + }, + new TimeSeriesPoint(881) + { + Timestamp = DateTimeOffset.Parse("1973-07-01T00:00:00Z"), + }, + new TimeSeriesPoint(837) + { + Timestamp = DateTimeOffset.Parse("1973-08-01T00:00:00Z"), + }, + new TimeSeriesPoint(784) + { + Timestamp = DateTimeOffset.Parse("1973-09-01T00:00:00Z"), + }, + new TimeSeriesPoint(791) + { + Timestamp = DateTimeOffset.Parse("1973-10-01T00:00:00Z"), + }, + new TimeSeriesPoint(760) + { + Timestamp = DateTimeOffset.Parse("1973-11-01T00:00:00Z"), + }, + new TimeSeriesPoint(802) + { + Timestamp = DateTimeOffset.Parse("1973-12-01T00:00:00Z"), + }, + new TimeSeriesPoint(828) + { + Timestamp = DateTimeOffset.Parse("1974-01-01T00:00:00Z"), + }, + new TimeSeriesPoint(1030) + { + Timestamp = DateTimeOffset.Parse("1974-02-01T00:00:00Z"), + }, + new TimeSeriesPoint(889) + { + Timestamp = DateTimeOffset.Parse("1974-03-01T00:00:00Z"), + }, + new TimeSeriesPoint(902) + { + Timestamp = DateTimeOffset.Parse("1974-04-01T00:00:00Z"), + }, + new TimeSeriesPoint(969) { - Timestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + Timestamp = DateTimeOffset.Parse("1974-05-01T00:00:00Z"), + }, + new TimeSeriesPoint(947) + { + Timestamp = DateTimeOffset.Parse("1974-06-01T00:00:00Z"), + }, + new TimeSeriesPoint(908) + { + Timestamp = DateTimeOffset.Parse("1974-07-01T00:00:00Z"), + }, + new TimeSeriesPoint(867) + { + Timestamp = DateTimeOffset.Parse("1974-08-01T00:00:00Z"), + }, + new TimeSeriesPoint(815) + { + Timestamp = DateTimeOffset.Parse("1974-09-01T00:00:00Z"), + }, + new TimeSeriesPoint(812) + { + Timestamp = DateTimeOffset.Parse("1974-10-01T00:00:00Z"), + }, + new TimeSeriesPoint(773) + { + Timestamp = DateTimeOffset.Parse("1974-11-01T00:00:00Z"), + }, + new TimeSeriesPoint(813) + { + Timestamp = DateTimeOffset.Parse("1974-12-01T00:00:00Z"), + }, + new TimeSeriesPoint(834) + { + Timestamp = DateTimeOffset.Parse("1975-01-01T00:00:00Z"), + }, + new TimeSeriesPoint(782) + { + Timestamp = DateTimeOffset.Parse("1975-02-01T00:00:00Z"), + }, + new TimeSeriesPoint(892) + { + Timestamp = DateTimeOffset.Parse("1975-03-01T00:00:00Z"), + }, + new TimeSeriesPoint(903) + { + Timestamp = DateTimeOffset.Parse("1975-04-01T00:00:00Z"), + }, + new TimeSeriesPoint(966) + { + Timestamp = DateTimeOffset.Parse("1975-05-01T00:00:00Z"), + }, + new TimeSeriesPoint(937) + { + Timestamp = DateTimeOffset.Parse("1975-06-01T00:00:00Z"), + }, + new TimeSeriesPoint(896) + { + Timestamp = DateTimeOffset.Parse("1975-07-01T00:00:00Z"), + }, + new TimeSeriesPoint(858) + { + Timestamp = DateTimeOffset.Parse("1975-08-01T00:00:00Z"), + }, + new TimeSeriesPoint(817) + { + Timestamp = DateTimeOffset.Parse("1975-09-01T00:00:00Z"), + }, + new TimeSeriesPoint(827) + { + Timestamp = DateTimeOffset.Parse("1975-10-01T00:00:00Z"), + }, + new TimeSeriesPoint(797) + { + Timestamp = DateTimeOffset.Parse("1975-11-01T00:00:00Z"), + }, + new TimeSeriesPoint(843) + { + Timestamp = DateTimeOffset.Parse("1975-12-01T00:00:00Z"), } }) { - Granularity = TimeGranularity.Yearly, - CustomInterval = 1234, - Period = 1234, - MaxAnomalyRatio = 123.45F, - Sensitivity = 1234, + Granularity = TimeGranularity.Monthly, + MaxAnomalyRatio = (float)0.25, + Sensitivity = 95, ImputeMode = ImputeMode.Auto, - ImputeFixedValue = 123.45F, }; Response response = await client.DetectUnivariateEntireSeriesAsync(options); ]]> @@ -44,37 +217,210 @@ Response response = await client.DetectUnivaria This sample shows how to call DetectUnivariateEntireSeries. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); - -UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] -{ - new TimeSeriesPoint(123.45F) -}); -Response response = client.DetectUnivariateEntireSeries(options); -]]> -This sample shows how to call DetectUnivariateEntireSeries with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] { - new TimeSeriesPoint(123.45F) + new TimeSeriesPoint(826) + { + Timestamp = DateTimeOffset.Parse("1972-01-01T00:00:00Z"), + }, + new TimeSeriesPoint(799) + { + Timestamp = DateTimeOffset.Parse("1972-02-01T00:00:00Z"), + }, + new TimeSeriesPoint(890) + { + Timestamp = DateTimeOffset.Parse("1972-03-01T00:00:00Z"), + }, + new TimeSeriesPoint(900) + { + Timestamp = DateTimeOffset.Parse("1972-04-01T00:00:00Z"), + }, + new TimeSeriesPoint(961) + { + Timestamp = DateTimeOffset.Parse("1972-05-01T00:00:00Z"), + }, + new TimeSeriesPoint(935) + { + Timestamp = DateTimeOffset.Parse("1972-06-01T00:00:00Z"), + }, + new TimeSeriesPoint(894) + { + Timestamp = DateTimeOffset.Parse("1972-07-01T00:00:00Z"), + }, + new TimeSeriesPoint(855) + { + Timestamp = DateTimeOffset.Parse("1972-08-01T00:00:00Z"), + }, + new TimeSeriesPoint(809) + { + Timestamp = DateTimeOffset.Parse("1972-09-01T00:00:00Z"), + }, + new TimeSeriesPoint(810) { - Timestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + Timestamp = DateTimeOffset.Parse("1972-10-01T00:00:00Z"), + }, + new TimeSeriesPoint(766) + { + Timestamp = DateTimeOffset.Parse("1972-11-01T00:00:00Z"), + }, + new TimeSeriesPoint(805) + { + Timestamp = DateTimeOffset.Parse("1972-12-01T00:00:00Z"), + }, + new TimeSeriesPoint(821) + { + Timestamp = DateTimeOffset.Parse("1973-01-01T00:00:00Z"), + }, + new TimeSeriesPoint(773) + { + Timestamp = DateTimeOffset.Parse("1973-02-01T00:00:00Z"), + }, + new TimeSeriesPoint(883) + { + Timestamp = DateTimeOffset.Parse("1973-03-01T00:00:00Z"), + }, + new TimeSeriesPoint(898) + { + Timestamp = DateTimeOffset.Parse("1973-04-01T00:00:00Z"), + }, + new TimeSeriesPoint(957) + { + Timestamp = DateTimeOffset.Parse("1973-05-01T00:00:00Z"), + }, + new TimeSeriesPoint(924) + { + Timestamp = DateTimeOffset.Parse("1973-06-01T00:00:00Z"), + }, + new TimeSeriesPoint(881) + { + Timestamp = DateTimeOffset.Parse("1973-07-01T00:00:00Z"), + }, + new TimeSeriesPoint(837) + { + Timestamp = DateTimeOffset.Parse("1973-08-01T00:00:00Z"), + }, + new TimeSeriesPoint(784) + { + Timestamp = DateTimeOffset.Parse("1973-09-01T00:00:00Z"), + }, + new TimeSeriesPoint(791) + { + Timestamp = DateTimeOffset.Parse("1973-10-01T00:00:00Z"), + }, + new TimeSeriesPoint(760) + { + Timestamp = DateTimeOffset.Parse("1973-11-01T00:00:00Z"), + }, + new TimeSeriesPoint(802) + { + Timestamp = DateTimeOffset.Parse("1973-12-01T00:00:00Z"), + }, + new TimeSeriesPoint(828) + { + Timestamp = DateTimeOffset.Parse("1974-01-01T00:00:00Z"), + }, + new TimeSeriesPoint(1030) + { + Timestamp = DateTimeOffset.Parse("1974-02-01T00:00:00Z"), + }, + new TimeSeriesPoint(889) + { + Timestamp = DateTimeOffset.Parse("1974-03-01T00:00:00Z"), + }, + new TimeSeriesPoint(902) + { + Timestamp = DateTimeOffset.Parse("1974-04-01T00:00:00Z"), + }, + new TimeSeriesPoint(969) + { + Timestamp = DateTimeOffset.Parse("1974-05-01T00:00:00Z"), + }, + new TimeSeriesPoint(947) + { + Timestamp = DateTimeOffset.Parse("1974-06-01T00:00:00Z"), + }, + new TimeSeriesPoint(908) + { + Timestamp = DateTimeOffset.Parse("1974-07-01T00:00:00Z"), + }, + new TimeSeriesPoint(867) + { + Timestamp = DateTimeOffset.Parse("1974-08-01T00:00:00Z"), + }, + new TimeSeriesPoint(815) + { + Timestamp = DateTimeOffset.Parse("1974-09-01T00:00:00Z"), + }, + new TimeSeriesPoint(812) + { + Timestamp = DateTimeOffset.Parse("1974-10-01T00:00:00Z"), + }, + new TimeSeriesPoint(773) + { + Timestamp = DateTimeOffset.Parse("1974-11-01T00:00:00Z"), + }, + new TimeSeriesPoint(813) + { + Timestamp = DateTimeOffset.Parse("1974-12-01T00:00:00Z"), + }, + new TimeSeriesPoint(834) + { + Timestamp = DateTimeOffset.Parse("1975-01-01T00:00:00Z"), + }, + new TimeSeriesPoint(782) + { + Timestamp = DateTimeOffset.Parse("1975-02-01T00:00:00Z"), + }, + new TimeSeriesPoint(892) + { + Timestamp = DateTimeOffset.Parse("1975-03-01T00:00:00Z"), + }, + new TimeSeriesPoint(903) + { + Timestamp = DateTimeOffset.Parse("1975-04-01T00:00:00Z"), + }, + new TimeSeriesPoint(966) + { + Timestamp = DateTimeOffset.Parse("1975-05-01T00:00:00Z"), + }, + new TimeSeriesPoint(937) + { + Timestamp = DateTimeOffset.Parse("1975-06-01T00:00:00Z"), + }, + new TimeSeriesPoint(896) + { + Timestamp = DateTimeOffset.Parse("1975-07-01T00:00:00Z"), + }, + new TimeSeriesPoint(858) + { + Timestamp = DateTimeOffset.Parse("1975-08-01T00:00:00Z"), + }, + new TimeSeriesPoint(817) + { + Timestamp = DateTimeOffset.Parse("1975-09-01T00:00:00Z"), + }, + new TimeSeriesPoint(827) + { + Timestamp = DateTimeOffset.Parse("1975-10-01T00:00:00Z"), + }, + new TimeSeriesPoint(797) + { + Timestamp = DateTimeOffset.Parse("1975-11-01T00:00:00Z"), + }, + new TimeSeriesPoint(843) + { + Timestamp = DateTimeOffset.Parse("1975-12-01T00:00:00Z"), } }) { - Granularity = TimeGranularity.Yearly, - CustomInterval = 1234, - Period = 1234, - MaxAnomalyRatio = 123.45F, - Sensitivity = 1234, + Granularity = TimeGranularity.Monthly, + MaxAnomalyRatio = (float)0.25, + Sensitivity = 95, ImputeMode = ImputeMode.Auto, - ImputeFixedValue = 123.45F, }; Response response = client.DetectUnivariateEntireSeries(options); ]]> @@ -83,7 +429,7 @@ Response response = client.DetectUnivariateEnti This sample shows how to call DetectUnivariateEntireSeriesAsync and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); @@ -93,77 +439,251 @@ using RequestContent content = RequestContent.Create(new { new { - value = 123.45F, - } - }, -}); -Response response = await client.DetectUnivariateEntireSeriesAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("period").ToString()); -Console.WriteLine(result.GetProperty("expectedValues")[0].ToString()); -Console.WriteLine(result.GetProperty("upperMargins")[0].ToString()); -Console.WriteLine(result.GetProperty("lowerMargins")[0].ToString()); -Console.WriteLine(result.GetProperty("isAnomaly")[0].ToString()); -Console.WriteLine(result.GetProperty("isNegativeAnomaly")[0].ToString()); -Console.WriteLine(result.GetProperty("isPositiveAnomaly")[0].ToString()); -]]> -This sample shows how to call DetectUnivariateEntireSeriesAsync with all request content and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); - -using RequestContent content = RequestContent.Create(new -{ - series = new object[] - { + timestamp = "1972-01-01T00:00:00Z", + value = 826, + }, new { - timestamp = "2022-05-10T18:57:31.2311892Z", - value = 123.45F, - } - }, - granularity = "yearly", - customInterval = 1234, - period = 1234, - maxAnomalyRatio = 123.45F, - sensitivity = 1234, - imputeMode = "auto", - imputeFixedValue = 123.45F, -}); -Response response = await client.DetectUnivariateEntireSeriesAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("period").ToString()); -Console.WriteLine(result.GetProperty("expectedValues")[0].ToString()); -Console.WriteLine(result.GetProperty("upperMargins")[0].ToString()); -Console.WriteLine(result.GetProperty("lowerMargins")[0].ToString()); -Console.WriteLine(result.GetProperty("isAnomaly")[0].ToString()); -Console.WriteLine(result.GetProperty("isNegativeAnomaly")[0].ToString()); -Console.WriteLine(result.GetProperty("isPositiveAnomaly")[0].ToString()); -Console.WriteLine(result.GetProperty("severity")[0].ToString()); -]]> - - - -This sample shows how to call DetectUnivariateEntireSeries and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); - -using RequestContent content = RequestContent.Create(new -{ - series = new object[] - { + timestamp = "1972-02-01T00:00:00Z", + value = 799, + }, new { - value = 123.45F, - } - }, -}); -Response response = client.DetectUnivariateEntireSeries(content); + timestamp = "1972-03-01T00:00:00Z", + value = 890, + }, + new + { + timestamp = "1972-04-01T00:00:00Z", + value = 900, + }, + new + { + timestamp = "1972-05-01T00:00:00Z", + value = 961, + }, + new + { + timestamp = "1972-06-01T00:00:00Z", + value = 935, + }, + new + { + timestamp = "1972-07-01T00:00:00Z", + value = 894, + }, + new + { + timestamp = "1972-08-01T00:00:00Z", + value = 855, + }, + new + { + timestamp = "1972-09-01T00:00:00Z", + value = 809, + }, + new + { + timestamp = "1972-10-01T00:00:00Z", + value = 810, + }, + new + { + timestamp = "1972-11-01T00:00:00Z", + value = 766, + }, + new + { + timestamp = "1972-12-01T00:00:00Z", + value = 805, + }, + new + { + timestamp = "1973-01-01T00:00:00Z", + value = 821, + }, + new + { + timestamp = "1973-02-01T00:00:00Z", + value = 773, + }, + new + { + timestamp = "1973-03-01T00:00:00Z", + value = 883, + }, + new + { + timestamp = "1973-04-01T00:00:00Z", + value = 898, + }, + new + { + timestamp = "1973-05-01T00:00:00Z", + value = 957, + }, + new + { + timestamp = "1973-06-01T00:00:00Z", + value = 924, + }, + new + { + timestamp = "1973-07-01T00:00:00Z", + value = 881, + }, + new + { + timestamp = "1973-08-01T00:00:00Z", + value = 837, + }, + new + { + timestamp = "1973-09-01T00:00:00Z", + value = 784, + }, + new + { + timestamp = "1973-10-01T00:00:00Z", + value = 791, + }, + new + { + timestamp = "1973-11-01T00:00:00Z", + value = 760, + }, + new + { + timestamp = "1973-12-01T00:00:00Z", + value = 802, + }, + new + { + timestamp = "1974-01-01T00:00:00Z", + value = 828, + }, + new + { + timestamp = "1974-02-01T00:00:00Z", + value = 1030, + }, + new + { + timestamp = "1974-03-01T00:00:00Z", + value = 889, + }, + new + { + timestamp = "1974-04-01T00:00:00Z", + value = 902, + }, + new + { + timestamp = "1974-05-01T00:00:00Z", + value = 969, + }, + new + { + timestamp = "1974-06-01T00:00:00Z", + value = 947, + }, + new + { + timestamp = "1974-07-01T00:00:00Z", + value = 908, + }, + new + { + timestamp = "1974-08-01T00:00:00Z", + value = 867, + }, + new + { + timestamp = "1974-09-01T00:00:00Z", + value = 815, + }, + new + { + timestamp = "1974-10-01T00:00:00Z", + value = 812, + }, + new + { + timestamp = "1974-11-01T00:00:00Z", + value = 773, + }, + new + { + timestamp = "1974-12-01T00:00:00Z", + value = 813, + }, + new + { + timestamp = "1975-01-01T00:00:00Z", + value = 834, + }, + new + { + timestamp = "1975-02-01T00:00:00Z", + value = 782, + }, + new + { + timestamp = "1975-03-01T00:00:00Z", + value = 892, + }, + new + { + timestamp = "1975-04-01T00:00:00Z", + value = 903, + }, + new + { + timestamp = "1975-05-01T00:00:00Z", + value = 966, + }, + new + { + timestamp = "1975-06-01T00:00:00Z", + value = 937, + }, + new + { + timestamp = "1975-07-01T00:00:00Z", + value = 896, + }, + new + { + timestamp = "1975-08-01T00:00:00Z", + value = 858, + }, + new + { + timestamp = "1975-09-01T00:00:00Z", + value = 817, + }, + new + { + timestamp = "1975-10-01T00:00:00Z", + value = 827, + }, + new + { + timestamp = "1975-11-01T00:00:00Z", + value = 797, + }, + new + { + timestamp = "1975-12-01T00:00:00Z", + value = 843, + } + }, + maxAnomalyRatio = 0.25, + sensitivity = 95, + granularity = "monthly", + imputeMode = "auto", +}); +Response response = await client.DetectUnivariateEntireSeriesAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("period").ToString()); @@ -173,10 +693,13 @@ Console.WriteLine(result.GetProperty("lowerMargins")[0].ToString()); Console.WriteLine(result.GetProperty("isAnomaly")[0].ToString()); Console.WriteLine(result.GetProperty("isNegativeAnomaly")[0].ToString()); Console.WriteLine(result.GetProperty("isPositiveAnomaly")[0].ToString()); -]]> -This sample shows how to call DetectUnivariateEntireSeries with all request content and parse the result. +]]> + + + +This sample shows how to call DetectUnivariateEntireSeries and parse the result. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); @@ -186,17 +709,249 @@ using RequestContent content = RequestContent.Create(new { new { - timestamp = "2022-05-10T18:57:31.2311892Z", - value = 123.45F, + timestamp = "1972-01-01T00:00:00Z", + value = 826, + }, + new + { + timestamp = "1972-02-01T00:00:00Z", + value = 799, + }, + new + { + timestamp = "1972-03-01T00:00:00Z", + value = 890, + }, + new + { + timestamp = "1972-04-01T00:00:00Z", + value = 900, + }, + new + { + timestamp = "1972-05-01T00:00:00Z", + value = 961, + }, + new + { + timestamp = "1972-06-01T00:00:00Z", + value = 935, + }, + new + { + timestamp = "1972-07-01T00:00:00Z", + value = 894, + }, + new + { + timestamp = "1972-08-01T00:00:00Z", + value = 855, + }, + new + { + timestamp = "1972-09-01T00:00:00Z", + value = 809, + }, + new + { + timestamp = "1972-10-01T00:00:00Z", + value = 810, + }, + new + { + timestamp = "1972-11-01T00:00:00Z", + value = 766, + }, + new + { + timestamp = "1972-12-01T00:00:00Z", + value = 805, + }, + new + { + timestamp = "1973-01-01T00:00:00Z", + value = 821, + }, + new + { + timestamp = "1973-02-01T00:00:00Z", + value = 773, + }, + new + { + timestamp = "1973-03-01T00:00:00Z", + value = 883, + }, + new + { + timestamp = "1973-04-01T00:00:00Z", + value = 898, + }, + new + { + timestamp = "1973-05-01T00:00:00Z", + value = 957, + }, + new + { + timestamp = "1973-06-01T00:00:00Z", + value = 924, + }, + new + { + timestamp = "1973-07-01T00:00:00Z", + value = 881, + }, + new + { + timestamp = "1973-08-01T00:00:00Z", + value = 837, + }, + new + { + timestamp = "1973-09-01T00:00:00Z", + value = 784, + }, + new + { + timestamp = "1973-10-01T00:00:00Z", + value = 791, + }, + new + { + timestamp = "1973-11-01T00:00:00Z", + value = 760, + }, + new + { + timestamp = "1973-12-01T00:00:00Z", + value = 802, + }, + new + { + timestamp = "1974-01-01T00:00:00Z", + value = 828, + }, + new + { + timestamp = "1974-02-01T00:00:00Z", + value = 1030, + }, + new + { + timestamp = "1974-03-01T00:00:00Z", + value = 889, + }, + new + { + timestamp = "1974-04-01T00:00:00Z", + value = 902, + }, + new + { + timestamp = "1974-05-01T00:00:00Z", + value = 969, + }, + new + { + timestamp = "1974-06-01T00:00:00Z", + value = 947, + }, + new + { + timestamp = "1974-07-01T00:00:00Z", + value = 908, + }, + new + { + timestamp = "1974-08-01T00:00:00Z", + value = 867, + }, + new + { + timestamp = "1974-09-01T00:00:00Z", + value = 815, + }, + new + { + timestamp = "1974-10-01T00:00:00Z", + value = 812, + }, + new + { + timestamp = "1974-11-01T00:00:00Z", + value = 773, + }, + new + { + timestamp = "1974-12-01T00:00:00Z", + value = 813, + }, + new + { + timestamp = "1975-01-01T00:00:00Z", + value = 834, + }, + new + { + timestamp = "1975-02-01T00:00:00Z", + value = 782, + }, + new + { + timestamp = "1975-03-01T00:00:00Z", + value = 892, + }, + new + { + timestamp = "1975-04-01T00:00:00Z", + value = 903, + }, + new + { + timestamp = "1975-05-01T00:00:00Z", + value = 966, + }, + new + { + timestamp = "1975-06-01T00:00:00Z", + value = 937, + }, + new + { + timestamp = "1975-07-01T00:00:00Z", + value = 896, + }, + new + { + timestamp = "1975-08-01T00:00:00Z", + value = 858, + }, + new + { + timestamp = "1975-09-01T00:00:00Z", + value = 817, + }, + new + { + timestamp = "1975-10-01T00:00:00Z", + value = 827, + }, + new + { + timestamp = "1975-11-01T00:00:00Z", + value = 797, + }, + new + { + timestamp = "1975-12-01T00:00:00Z", + value = 843, } }, - granularity = "yearly", - customInterval = 1234, - period = 1234, - maxAnomalyRatio = 123.45F, - sensitivity = 1234, + maxAnomalyRatio = 0.25, + sensitivity = 95, + granularity = "monthly", imputeMode = "auto", - imputeFixedValue = 123.45F, }); Response response = client.DetectUnivariateEntireSeries(content); @@ -208,378 +963,441 @@ Console.WriteLine(result.GetProperty("lowerMargins")[0].ToString()); Console.WriteLine(result.GetProperty("isAnomaly")[0].ToString()); Console.WriteLine(result.GetProperty("isNegativeAnomaly")[0].ToString()); Console.WriteLine(result.GetProperty("isPositiveAnomaly")[0].ToString()); -Console.WriteLine(result.GetProperty("severity")[0].ToString()); ]]> This sample shows how to call DetectUnivariateLastPointAsync. "); -AzureKeyCredential credential = new AzureKeyCredential(""); -Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); - -UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] -{ - new TimeSeriesPoint(123.45F) -}); -Response response = await client.DetectUnivariateLastPointAsync(options); -]]> -This sample shows how to call DetectUnivariateLastPointAsync with all parameters. -"); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] { - new TimeSeriesPoint(123.45F) + new TimeSeriesPoint(826) { - Timestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - } -}) -{ - Granularity = TimeGranularity.Yearly, - CustomInterval = 1234, - Period = 1234, - MaxAnomalyRatio = 123.45F, - Sensitivity = 1234, - ImputeMode = ImputeMode.Auto, - ImputeFixedValue = 123.45F, -}; -Response response = await client.DetectUnivariateLastPointAsync(options); -]]> - - - -This sample shows how to call DetectUnivariateLastPoint. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); - -UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] -{ - new TimeSeriesPoint(123.45F) -}); -Response response = client.DetectUnivariateLastPoint(options); -]]> -This sample shows how to call DetectUnivariateLastPoint with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); - -UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] -{ - new TimeSeriesPoint(123.45F) + Timestamp = DateTimeOffset.Parse("1972-01-01T00:00:00Z"), + }, + new TimeSeriesPoint(799) { - Timestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - } -}) -{ - Granularity = TimeGranularity.Yearly, - CustomInterval = 1234, - Period = 1234, - MaxAnomalyRatio = 123.45F, - Sensitivity = 1234, - ImputeMode = ImputeMode.Auto, - ImputeFixedValue = 123.45F, -}; -Response response = client.DetectUnivariateLastPoint(options); -]]> - - - -This sample shows how to call DetectUnivariateLastPointAsync and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); - -using RequestContent content = RequestContent.Create(new -{ - series = new object[] + Timestamp = DateTimeOffset.Parse("1972-02-01T00:00:00Z"), + }, + new TimeSeriesPoint(890) { - new - { - value = 123.45F, - } + Timestamp = DateTimeOffset.Parse("1972-03-01T00:00:00Z"), }, -}); -Response response = await client.DetectUnivariateLastPointAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("period").ToString()); -Console.WriteLine(result.GetProperty("suggestedWindow").ToString()); -Console.WriteLine(result.GetProperty("expectedValue").ToString()); -Console.WriteLine(result.GetProperty("upperMargin").ToString()); -Console.WriteLine(result.GetProperty("lowerMargin").ToString()); -Console.WriteLine(result.GetProperty("isAnomaly").ToString()); -Console.WriteLine(result.GetProperty("isNegativeAnomaly").ToString()); -Console.WriteLine(result.GetProperty("isPositiveAnomaly").ToString()); -]]> -This sample shows how to call DetectUnivariateLastPointAsync with all request content and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); - -using RequestContent content = RequestContent.Create(new -{ - series = new object[] + new TimeSeriesPoint(900) { - new - { - timestamp = "2022-05-10T18:57:31.2311892Z", - value = 123.45F, - } + Timestamp = DateTimeOffset.Parse("1972-04-01T00:00:00Z"), }, - granularity = "yearly", - customInterval = 1234, - period = 1234, - maxAnomalyRatio = 123.45F, - sensitivity = 1234, - imputeMode = "auto", - imputeFixedValue = 123.45F, -}); -Response response = await client.DetectUnivariateLastPointAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("period").ToString()); -Console.WriteLine(result.GetProperty("suggestedWindow").ToString()); -Console.WriteLine(result.GetProperty("expectedValue").ToString()); -Console.WriteLine(result.GetProperty("upperMargin").ToString()); -Console.WriteLine(result.GetProperty("lowerMargin").ToString()); -Console.WriteLine(result.GetProperty("isAnomaly").ToString()); -Console.WriteLine(result.GetProperty("isNegativeAnomaly").ToString()); -Console.WriteLine(result.GetProperty("isPositiveAnomaly").ToString()); -Console.WriteLine(result.GetProperty("severity").ToString()); -]]> - - - -This sample shows how to call DetectUnivariateLastPoint and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); - -using RequestContent content = RequestContent.Create(new -{ - series = new object[] + new TimeSeriesPoint(961) { - new - { - value = 123.45F, - } + Timestamp = DateTimeOffset.Parse("1972-05-01T00:00:00Z"), }, -}); -Response response = client.DetectUnivariateLastPoint(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("period").ToString()); -Console.WriteLine(result.GetProperty("suggestedWindow").ToString()); -Console.WriteLine(result.GetProperty("expectedValue").ToString()); -Console.WriteLine(result.GetProperty("upperMargin").ToString()); -Console.WriteLine(result.GetProperty("lowerMargin").ToString()); -Console.WriteLine(result.GetProperty("isAnomaly").ToString()); -Console.WriteLine(result.GetProperty("isNegativeAnomaly").ToString()); -Console.WriteLine(result.GetProperty("isPositiveAnomaly").ToString()); -]]> -This sample shows how to call DetectUnivariateLastPoint with all request content and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); - -using RequestContent content = RequestContent.Create(new -{ - series = new object[] + new TimeSeriesPoint(935) { - new - { - timestamp = "2022-05-10T18:57:31.2311892Z", - value = 123.45F, - } + Timestamp = DateTimeOffset.Parse("1972-06-01T00:00:00Z"), }, - granularity = "yearly", - customInterval = 1234, - period = 1234, - maxAnomalyRatio = 123.45F, - sensitivity = 1234, - imputeMode = "auto", - imputeFixedValue = 123.45F, -}); -Response response = client.DetectUnivariateLastPoint(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("period").ToString()); -Console.WriteLine(result.GetProperty("suggestedWindow").ToString()); -Console.WriteLine(result.GetProperty("expectedValue").ToString()); -Console.WriteLine(result.GetProperty("upperMargin").ToString()); -Console.WriteLine(result.GetProperty("lowerMargin").ToString()); -Console.WriteLine(result.GetProperty("isAnomaly").ToString()); -Console.WriteLine(result.GetProperty("isNegativeAnomaly").ToString()); -Console.WriteLine(result.GetProperty("isPositiveAnomaly").ToString()); -Console.WriteLine(result.GetProperty("severity").ToString()); -]]> - - - -This sample shows how to call DetectUnivariateChangePointAsync. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); - -UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[] -{ - new TimeSeriesPoint(123.45F) -}, TimeGranularity.Yearly); -Response response = await client.DetectUnivariateChangePointAsync(options); -]]> -This sample shows how to call DetectUnivariateChangePointAsync with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); - -UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[] -{ - new TimeSeriesPoint(123.45F) + new TimeSeriesPoint(894) { - Timestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), - } -}, TimeGranularity.Yearly) -{ - CustomInterval = 1234, - Period = 1234, - StableTrendWindow = 1234, - Threshold = 123.45F, -}; -Response response = await client.DetectUnivariateChangePointAsync(options); -]]> - - - -This sample shows how to call DetectUnivariateChangePoint. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); - -UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[] -{ - new TimeSeriesPoint(123.45F) -}, TimeGranularity.Yearly); -Response response = client.DetectUnivariateChangePoint(options); -]]> -This sample shows how to call DetectUnivariateChangePoint with all parameters. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); - -UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[] -{ - new TimeSeriesPoint(123.45F) + Timestamp = DateTimeOffset.Parse("1972-07-01T00:00:00Z"), + }, + new TimeSeriesPoint(855) + { + Timestamp = DateTimeOffset.Parse("1972-08-01T00:00:00Z"), + }, + new TimeSeriesPoint(809) + { + Timestamp = DateTimeOffset.Parse("1972-09-01T00:00:00Z"), + }, + new TimeSeriesPoint(810) + { + Timestamp = DateTimeOffset.Parse("1972-10-01T00:00:00Z"), + }, + new TimeSeriesPoint(766) + { + Timestamp = DateTimeOffset.Parse("1972-11-01T00:00:00Z"), + }, + new TimeSeriesPoint(805) { - Timestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), + Timestamp = DateTimeOffset.Parse("1972-12-01T00:00:00Z"), + }, + new TimeSeriesPoint(821) + { + Timestamp = DateTimeOffset.Parse("1973-01-01T00:00:00Z"), + }, + new TimeSeriesPoint(773) + { + Timestamp = DateTimeOffset.Parse("1973-02-01T00:00:00Z"), + }, + new TimeSeriesPoint(883) + { + Timestamp = DateTimeOffset.Parse("1973-03-01T00:00:00Z"), + }, + new TimeSeriesPoint(898) + { + Timestamp = DateTimeOffset.Parse("1973-04-01T00:00:00Z"), + }, + new TimeSeriesPoint(957) + { + Timestamp = DateTimeOffset.Parse("1973-05-01T00:00:00Z"), + }, + new TimeSeriesPoint(924) + { + Timestamp = DateTimeOffset.Parse("1973-06-01T00:00:00Z"), + }, + new TimeSeriesPoint(881) + { + Timestamp = DateTimeOffset.Parse("1973-07-01T00:00:00Z"), + }, + new TimeSeriesPoint(837) + { + Timestamp = DateTimeOffset.Parse("1973-08-01T00:00:00Z"), + }, + new TimeSeriesPoint(784) + { + Timestamp = DateTimeOffset.Parse("1973-09-01T00:00:00Z"), + }, + new TimeSeriesPoint(791) + { + Timestamp = DateTimeOffset.Parse("1973-10-01T00:00:00Z"), + }, + new TimeSeriesPoint(760) + { + Timestamp = DateTimeOffset.Parse("1973-11-01T00:00:00Z"), + }, + new TimeSeriesPoint(802) + { + Timestamp = DateTimeOffset.Parse("1973-12-01T00:00:00Z"), + }, + new TimeSeriesPoint(828) + { + Timestamp = DateTimeOffset.Parse("1974-01-01T00:00:00Z"), + }, + new TimeSeriesPoint(1030) + { + Timestamp = DateTimeOffset.Parse("1974-02-01T00:00:00Z"), + }, + new TimeSeriesPoint(889) + { + Timestamp = DateTimeOffset.Parse("1974-03-01T00:00:00Z"), + }, + new TimeSeriesPoint(902) + { + Timestamp = DateTimeOffset.Parse("1974-04-01T00:00:00Z"), + }, + new TimeSeriesPoint(969) + { + Timestamp = DateTimeOffset.Parse("1974-05-01T00:00:00Z"), + }, + new TimeSeriesPoint(947) + { + Timestamp = DateTimeOffset.Parse("1974-06-01T00:00:00Z"), + }, + new TimeSeriesPoint(908) + { + Timestamp = DateTimeOffset.Parse("1974-07-01T00:00:00Z"), + }, + new TimeSeriesPoint(867) + { + Timestamp = DateTimeOffset.Parse("1974-08-01T00:00:00Z"), + }, + new TimeSeriesPoint(815) + { + Timestamp = DateTimeOffset.Parse("1974-09-01T00:00:00Z"), + }, + new TimeSeriesPoint(812) + { + Timestamp = DateTimeOffset.Parse("1974-10-01T00:00:00Z"), + }, + new TimeSeriesPoint(773) + { + Timestamp = DateTimeOffset.Parse("1974-11-01T00:00:00Z"), + }, + new TimeSeriesPoint(813) + { + Timestamp = DateTimeOffset.Parse("1974-12-01T00:00:00Z"), + }, + new TimeSeriesPoint(834) + { + Timestamp = DateTimeOffset.Parse("1975-01-01T00:00:00Z"), + }, + new TimeSeriesPoint(782) + { + Timestamp = DateTimeOffset.Parse("1975-02-01T00:00:00Z"), + }, + new TimeSeriesPoint(892) + { + Timestamp = DateTimeOffset.Parse("1975-03-01T00:00:00Z"), + }, + new TimeSeriesPoint(903) + { + Timestamp = DateTimeOffset.Parse("1975-04-01T00:00:00Z"), + }, + new TimeSeriesPoint(966) + { + Timestamp = DateTimeOffset.Parse("1975-05-01T00:00:00Z"), + }, + new TimeSeriesPoint(937) + { + Timestamp = DateTimeOffset.Parse("1975-06-01T00:00:00Z"), + }, + new TimeSeriesPoint(896) + { + Timestamp = DateTimeOffset.Parse("1975-07-01T00:00:00Z"), + }, + new TimeSeriesPoint(858) + { + Timestamp = DateTimeOffset.Parse("1975-08-01T00:00:00Z"), + }, + new TimeSeriesPoint(817) + { + Timestamp = DateTimeOffset.Parse("1975-09-01T00:00:00Z"), + }, + new TimeSeriesPoint(827) + { + Timestamp = DateTimeOffset.Parse("1975-10-01T00:00:00Z"), + }, + new TimeSeriesPoint(797) + { + Timestamp = DateTimeOffset.Parse("1975-11-01T00:00:00Z"), + }, + new TimeSeriesPoint(843) + { + Timestamp = DateTimeOffset.Parse("1975-12-01T00:00:00Z"), } -}, TimeGranularity.Yearly) +}) { - CustomInterval = 1234, - Period = 1234, - StableTrendWindow = 1234, - Threshold = 123.45F, + Granularity = TimeGranularity.Monthly, + MaxAnomalyRatio = (float)0.25, + Sensitivity = 95, + ImputeMode = ImputeMode.Fixed, + ImputeFixedValue = 800, }; -Response response = client.DetectUnivariateChangePoint(options); +Response response = await client.DetectUnivariateLastPointAsync(options); ]]> - + -This sample shows how to call DetectUnivariateChangePointAsync and parse the result. +This sample shows how to call DetectUnivariateLastPoint. "); +Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); -using RequestContent content = RequestContent.Create(new +UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] { - series = new object[] + new TimeSeriesPoint(826) { - new - { - value = 123.45F, - } + Timestamp = DateTimeOffset.Parse("1972-01-01T00:00:00Z"), }, - granularity = "yearly", -}); -Response response = await client.DetectUnivariateChangePointAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call DetectUnivariateChangePointAsync with all request content and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); - -using RequestContent content = RequestContent.Create(new -{ - series = new object[] + new TimeSeriesPoint(799) { - new - { - timestamp = "2022-05-10T18:57:31.2311892Z", - value = 123.45F, - } + Timestamp = DateTimeOffset.Parse("1972-02-01T00:00:00Z"), }, - granularity = "yearly", - customInterval = 1234, - period = 1234, - stableTrendWindow = 1234, - threshold = 123.45F, -}); -Response response = await client.DetectUnivariateChangePointAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("period").ToString()); -Console.WriteLine(result.GetProperty("isChangePoint")[0].ToString()); -Console.WriteLine(result.GetProperty("confidenceScores")[0].ToString()); -]]> - - - -This sample shows how to call DetectUnivariateChangePoint and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); - -using RequestContent content = RequestContent.Create(new -{ - series = new object[] + new TimeSeriesPoint(890) { - new - { - value = 123.45F, - } + Timestamp = DateTimeOffset.Parse("1972-03-01T00:00:00Z"), }, - granularity = "yearly", -}); -Response response = client.DetectUnivariateChangePoint(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call DetectUnivariateChangePoint with all request content and parse the result. -"); -AzureKeyCredential credential = new AzureKeyCredential(""); -Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); + new TimeSeriesPoint(900) + { + Timestamp = DateTimeOffset.Parse("1972-04-01T00:00:00Z"), + }, + new TimeSeriesPoint(961) + { + Timestamp = DateTimeOffset.Parse("1972-05-01T00:00:00Z"), + }, + new TimeSeriesPoint(935) + { + Timestamp = DateTimeOffset.Parse("1972-06-01T00:00:00Z"), + }, + new TimeSeriesPoint(894) + { + Timestamp = DateTimeOffset.Parse("1972-07-01T00:00:00Z"), + }, + new TimeSeriesPoint(855) + { + Timestamp = DateTimeOffset.Parse("1972-08-01T00:00:00Z"), + }, + new TimeSeriesPoint(809) + { + Timestamp = DateTimeOffset.Parse("1972-09-01T00:00:00Z"), + }, + new TimeSeriesPoint(810) + { + Timestamp = DateTimeOffset.Parse("1972-10-01T00:00:00Z"), + }, + new TimeSeriesPoint(766) + { + Timestamp = DateTimeOffset.Parse("1972-11-01T00:00:00Z"), + }, + new TimeSeriesPoint(805) + { + Timestamp = DateTimeOffset.Parse("1972-12-01T00:00:00Z"), + }, + new TimeSeriesPoint(821) + { + Timestamp = DateTimeOffset.Parse("1973-01-01T00:00:00Z"), + }, + new TimeSeriesPoint(773) + { + Timestamp = DateTimeOffset.Parse("1973-02-01T00:00:00Z"), + }, + new TimeSeriesPoint(883) + { + Timestamp = DateTimeOffset.Parse("1973-03-01T00:00:00Z"), + }, + new TimeSeriesPoint(898) + { + Timestamp = DateTimeOffset.Parse("1973-04-01T00:00:00Z"), + }, + new TimeSeriesPoint(957) + { + Timestamp = DateTimeOffset.Parse("1973-05-01T00:00:00Z"), + }, + new TimeSeriesPoint(924) + { + Timestamp = DateTimeOffset.Parse("1973-06-01T00:00:00Z"), + }, + new TimeSeriesPoint(881) + { + Timestamp = DateTimeOffset.Parse("1973-07-01T00:00:00Z"), + }, + new TimeSeriesPoint(837) + { + Timestamp = DateTimeOffset.Parse("1973-08-01T00:00:00Z"), + }, + new TimeSeriesPoint(784) + { + Timestamp = DateTimeOffset.Parse("1973-09-01T00:00:00Z"), + }, + new TimeSeriesPoint(791) + { + Timestamp = DateTimeOffset.Parse("1973-10-01T00:00:00Z"), + }, + new TimeSeriesPoint(760) + { + Timestamp = DateTimeOffset.Parse("1973-11-01T00:00:00Z"), + }, + new TimeSeriesPoint(802) + { + Timestamp = DateTimeOffset.Parse("1973-12-01T00:00:00Z"), + }, + new TimeSeriesPoint(828) + { + Timestamp = DateTimeOffset.Parse("1974-01-01T00:00:00Z"), + }, + new TimeSeriesPoint(1030) + { + Timestamp = DateTimeOffset.Parse("1974-02-01T00:00:00Z"), + }, + new TimeSeriesPoint(889) + { + Timestamp = DateTimeOffset.Parse("1974-03-01T00:00:00Z"), + }, + new TimeSeriesPoint(902) + { + Timestamp = DateTimeOffset.Parse("1974-04-01T00:00:00Z"), + }, + new TimeSeriesPoint(969) + { + Timestamp = DateTimeOffset.Parse("1974-05-01T00:00:00Z"), + }, + new TimeSeriesPoint(947) + { + Timestamp = DateTimeOffset.Parse("1974-06-01T00:00:00Z"), + }, + new TimeSeriesPoint(908) + { + Timestamp = DateTimeOffset.Parse("1974-07-01T00:00:00Z"), + }, + new TimeSeriesPoint(867) + { + Timestamp = DateTimeOffset.Parse("1974-08-01T00:00:00Z"), + }, + new TimeSeriesPoint(815) + { + Timestamp = DateTimeOffset.Parse("1974-09-01T00:00:00Z"), + }, + new TimeSeriesPoint(812) + { + Timestamp = DateTimeOffset.Parse("1974-10-01T00:00:00Z"), + }, + new TimeSeriesPoint(773) + { + Timestamp = DateTimeOffset.Parse("1974-11-01T00:00:00Z"), + }, + new TimeSeriesPoint(813) + { + Timestamp = DateTimeOffset.Parse("1974-12-01T00:00:00Z"), + }, + new TimeSeriesPoint(834) + { + Timestamp = DateTimeOffset.Parse("1975-01-01T00:00:00Z"), + }, + new TimeSeriesPoint(782) + { + Timestamp = DateTimeOffset.Parse("1975-02-01T00:00:00Z"), + }, + new TimeSeriesPoint(892) + { + Timestamp = DateTimeOffset.Parse("1975-03-01T00:00:00Z"), + }, + new TimeSeriesPoint(903) + { + Timestamp = DateTimeOffset.Parse("1975-04-01T00:00:00Z"), + }, + new TimeSeriesPoint(966) + { + Timestamp = DateTimeOffset.Parse("1975-05-01T00:00:00Z"), + }, + new TimeSeriesPoint(937) + { + Timestamp = DateTimeOffset.Parse("1975-06-01T00:00:00Z"), + }, + new TimeSeriesPoint(896) + { + Timestamp = DateTimeOffset.Parse("1975-07-01T00:00:00Z"), + }, + new TimeSeriesPoint(858) + { + Timestamp = DateTimeOffset.Parse("1975-08-01T00:00:00Z"), + }, + new TimeSeriesPoint(817) + { + Timestamp = DateTimeOffset.Parse("1975-09-01T00:00:00Z"), + }, + new TimeSeriesPoint(827) + { + Timestamp = DateTimeOffset.Parse("1975-10-01T00:00:00Z"), + }, + new TimeSeriesPoint(797) + { + Timestamp = DateTimeOffset.Parse("1975-11-01T00:00:00Z"), + }, + new TimeSeriesPoint(843) + { + Timestamp = DateTimeOffset.Parse("1975-12-01T00:00:00Z"), + } +}) +{ + Granularity = TimeGranularity.Monthly, + MaxAnomalyRatio = (float)0.25, + Sensitivity = 95, + ImputeMode = ImputeMode.Fixed, + ImputeFixedValue = 800, +}; +Response response = client.DetectUnivariateLastPoint(options); +]]> + + + +This sample shows how to call DetectUnivariateLastPointAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); using RequestContent content = RequestContent.Create(new { @@ -587,22 +1405,5250 @@ using RequestContent content = RequestContent.Create(new { new { - timestamp = "2022-05-10T18:57:31.2311892Z", - value = 123.45F, + timestamp = "1972-01-01T00:00:00Z", + value = 826, + }, + new + { + timestamp = "1972-02-01T00:00:00Z", + value = 799, + }, + new + { + timestamp = "1972-03-01T00:00:00Z", + value = 890, + }, + new + { + timestamp = "1972-04-01T00:00:00Z", + value = 900, + }, + new + { + timestamp = "1972-05-01T00:00:00Z", + value = 961, + }, + new + { + timestamp = "1972-06-01T00:00:00Z", + value = 935, + }, + new + { + timestamp = "1972-07-01T00:00:00Z", + value = 894, + }, + new + { + timestamp = "1972-08-01T00:00:00Z", + value = 855, + }, + new + { + timestamp = "1972-09-01T00:00:00Z", + value = 809, + }, + new + { + timestamp = "1972-10-01T00:00:00Z", + value = 810, + }, + new + { + timestamp = "1972-11-01T00:00:00Z", + value = 766, + }, + new + { + timestamp = "1972-12-01T00:00:00Z", + value = 805, + }, + new + { + timestamp = "1973-01-01T00:00:00Z", + value = 821, + }, + new + { + timestamp = "1973-02-01T00:00:00Z", + value = 773, + }, + new + { + timestamp = "1973-03-01T00:00:00Z", + value = 883, + }, + new + { + timestamp = "1973-04-01T00:00:00Z", + value = 898, + }, + new + { + timestamp = "1973-05-01T00:00:00Z", + value = 957, + }, + new + { + timestamp = "1973-06-01T00:00:00Z", + value = 924, + }, + new + { + timestamp = "1973-07-01T00:00:00Z", + value = 881, + }, + new + { + timestamp = "1973-08-01T00:00:00Z", + value = 837, + }, + new + { + timestamp = "1973-09-01T00:00:00Z", + value = 784, + }, + new + { + timestamp = "1973-10-01T00:00:00Z", + value = 791, + }, + new + { + timestamp = "1973-11-01T00:00:00Z", + value = 760, + }, + new + { + timestamp = "1973-12-01T00:00:00Z", + value = 802, + }, + new + { + timestamp = "1974-01-01T00:00:00Z", + value = 828, + }, + new + { + timestamp = "1974-02-01T00:00:00Z", + value = 1030, + }, + new + { + timestamp = "1974-03-01T00:00:00Z", + value = 889, + }, + new + { + timestamp = "1974-04-01T00:00:00Z", + value = 902, + }, + new + { + timestamp = "1974-05-01T00:00:00Z", + value = 969, + }, + new + { + timestamp = "1974-06-01T00:00:00Z", + value = 947, + }, + new + { + timestamp = "1974-07-01T00:00:00Z", + value = 908, + }, + new + { + timestamp = "1974-08-01T00:00:00Z", + value = 867, + }, + new + { + timestamp = "1974-09-01T00:00:00Z", + value = 815, + }, + new + { + timestamp = "1974-10-01T00:00:00Z", + value = 812, + }, + new + { + timestamp = "1974-11-01T00:00:00Z", + value = 773, + }, + new + { + timestamp = "1974-12-01T00:00:00Z", + value = 813, + }, + new + { + timestamp = "1975-01-01T00:00:00Z", + value = 834, + }, + new + { + timestamp = "1975-02-01T00:00:00Z", + value = 782, + }, + new + { + timestamp = "1975-03-01T00:00:00Z", + value = 892, + }, + new + { + timestamp = "1975-04-01T00:00:00Z", + value = 903, + }, + new + { + timestamp = "1975-05-01T00:00:00Z", + value = 966, + }, + new + { + timestamp = "1975-06-01T00:00:00Z", + value = 937, + }, + new + { + timestamp = "1975-07-01T00:00:00Z", + value = 896, + }, + new + { + timestamp = "1975-08-01T00:00:00Z", + value = 858, + }, + new + { + timestamp = "1975-09-01T00:00:00Z", + value = 817, + }, + new + { + timestamp = "1975-10-01T00:00:00Z", + value = 827, + }, + new + { + timestamp = "1975-11-01T00:00:00Z", + value = 797, + }, + new + { + timestamp = "1975-12-01T00:00:00Z", + value = 843, } }, - granularity = "yearly", - customInterval = 1234, - period = 1234, - stableTrendWindow = 1234, - threshold = 123.45F, + maxAnomalyRatio = 0.25, + sensitivity = 95, + granularity = "monthly", + imputeMode = "fixed", + imputeFixedValue = 800, }); -Response response = client.DetectUnivariateChangePoint(content); +Response response = await client.DetectUnivariateLastPointAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("period").ToString()); -Console.WriteLine(result.GetProperty("isChangePoint")[0].ToString()); -Console.WriteLine(result.GetProperty("confidenceScores")[0].ToString()); +Console.WriteLine(result.GetProperty("suggestedWindow").ToString()); +Console.WriteLine(result.GetProperty("expectedValue").ToString()); +Console.WriteLine(result.GetProperty("upperMargin").ToString()); +Console.WriteLine(result.GetProperty("lowerMargin").ToString()); +Console.WriteLine(result.GetProperty("isAnomaly").ToString()); +Console.WriteLine(result.GetProperty("isNegativeAnomaly").ToString()); +Console.WriteLine(result.GetProperty("isPositiveAnomaly").ToString()); +]]> + + + +This sample shows how to call DetectUnivariateLastPoint and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); + +using RequestContent content = RequestContent.Create(new +{ + series = new object[] + { + new + { + timestamp = "1972-01-01T00:00:00Z", + value = 826, + }, + new + { + timestamp = "1972-02-01T00:00:00Z", + value = 799, + }, + new + { + timestamp = "1972-03-01T00:00:00Z", + value = 890, + }, + new + { + timestamp = "1972-04-01T00:00:00Z", + value = 900, + }, + new + { + timestamp = "1972-05-01T00:00:00Z", + value = 961, + }, + new + { + timestamp = "1972-06-01T00:00:00Z", + value = 935, + }, + new + { + timestamp = "1972-07-01T00:00:00Z", + value = 894, + }, + new + { + timestamp = "1972-08-01T00:00:00Z", + value = 855, + }, + new + { + timestamp = "1972-09-01T00:00:00Z", + value = 809, + }, + new + { + timestamp = "1972-10-01T00:00:00Z", + value = 810, + }, + new + { + timestamp = "1972-11-01T00:00:00Z", + value = 766, + }, + new + { + timestamp = "1972-12-01T00:00:00Z", + value = 805, + }, + new + { + timestamp = "1973-01-01T00:00:00Z", + value = 821, + }, + new + { + timestamp = "1973-02-01T00:00:00Z", + value = 773, + }, + new + { + timestamp = "1973-03-01T00:00:00Z", + value = 883, + }, + new + { + timestamp = "1973-04-01T00:00:00Z", + value = 898, + }, + new + { + timestamp = "1973-05-01T00:00:00Z", + value = 957, + }, + new + { + timestamp = "1973-06-01T00:00:00Z", + value = 924, + }, + new + { + timestamp = "1973-07-01T00:00:00Z", + value = 881, + }, + new + { + timestamp = "1973-08-01T00:00:00Z", + value = 837, + }, + new + { + timestamp = "1973-09-01T00:00:00Z", + value = 784, + }, + new + { + timestamp = "1973-10-01T00:00:00Z", + value = 791, + }, + new + { + timestamp = "1973-11-01T00:00:00Z", + value = 760, + }, + new + { + timestamp = "1973-12-01T00:00:00Z", + value = 802, + }, + new + { + timestamp = "1974-01-01T00:00:00Z", + value = 828, + }, + new + { + timestamp = "1974-02-01T00:00:00Z", + value = 1030, + }, + new + { + timestamp = "1974-03-01T00:00:00Z", + value = 889, + }, + new + { + timestamp = "1974-04-01T00:00:00Z", + value = 902, + }, + new + { + timestamp = "1974-05-01T00:00:00Z", + value = 969, + }, + new + { + timestamp = "1974-06-01T00:00:00Z", + value = 947, + }, + new + { + timestamp = "1974-07-01T00:00:00Z", + value = 908, + }, + new + { + timestamp = "1974-08-01T00:00:00Z", + value = 867, + }, + new + { + timestamp = "1974-09-01T00:00:00Z", + value = 815, + }, + new + { + timestamp = "1974-10-01T00:00:00Z", + value = 812, + }, + new + { + timestamp = "1974-11-01T00:00:00Z", + value = 773, + }, + new + { + timestamp = "1974-12-01T00:00:00Z", + value = 813, + }, + new + { + timestamp = "1975-01-01T00:00:00Z", + value = 834, + }, + new + { + timestamp = "1975-02-01T00:00:00Z", + value = 782, + }, + new + { + timestamp = "1975-03-01T00:00:00Z", + value = 892, + }, + new + { + timestamp = "1975-04-01T00:00:00Z", + value = 903, + }, + new + { + timestamp = "1975-05-01T00:00:00Z", + value = 966, + }, + new + { + timestamp = "1975-06-01T00:00:00Z", + value = 937, + }, + new + { + timestamp = "1975-07-01T00:00:00Z", + value = 896, + }, + new + { + timestamp = "1975-08-01T00:00:00Z", + value = 858, + }, + new + { + timestamp = "1975-09-01T00:00:00Z", + value = 817, + }, + new + { + timestamp = "1975-10-01T00:00:00Z", + value = 827, + }, + new + { + timestamp = "1975-11-01T00:00:00Z", + value = 797, + }, + new + { + timestamp = "1975-12-01T00:00:00Z", + value = 843, + } + }, + maxAnomalyRatio = 0.25, + sensitivity = 95, + granularity = "monthly", + imputeMode = "fixed", + imputeFixedValue = 800, +}); +Response response = client.DetectUnivariateLastPoint(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("period").ToString()); +Console.WriteLine(result.GetProperty("suggestedWindow").ToString()); +Console.WriteLine(result.GetProperty("expectedValue").ToString()); +Console.WriteLine(result.GetProperty("upperMargin").ToString()); +Console.WriteLine(result.GetProperty("lowerMargin").ToString()); +Console.WriteLine(result.GetProperty("isAnomaly").ToString()); +Console.WriteLine(result.GetProperty("isNegativeAnomaly").ToString()); +Console.WriteLine(result.GetProperty("isPositiveAnomaly").ToString()); +]]> + + + +This sample shows how to call DetectUnivariateChangePointAsync. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); + +UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[] +{ + new TimeSeriesPoint(1639196) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T06:45:00Z"), + }, + new TimeSeriesPoint(1639290) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T06:50:00Z"), + }, + new TimeSeriesPoint(1667293) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T06:55:00Z"), + }, + new TimeSeriesPoint(1703130) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T07:00:00Z"), + }, + new TimeSeriesPoint(1650912) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T07:05:00Z"), + }, + new TimeSeriesPoint(1653596) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T07:10:00Z"), + }, + new TimeSeriesPoint(1653793) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T07:15:00Z"), + }, + new TimeSeriesPoint(1653795) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T07:20:00Z"), + }, + new TimeSeriesPoint(1663471) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T07:25:00Z"), + }, + new TimeSeriesPoint(1662358) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T07:30:00Z"), + }, + new TimeSeriesPoint(1664320) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T07:35:00Z"), + }, + new TimeSeriesPoint(1664942) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T07:40:00Z"), + }, + new TimeSeriesPoint(1664966) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T07:45:00Z"), + }, + new TimeSeriesPoint(1724271) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T07:50:00Z"), + }, + new TimeSeriesPoint(1678720) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T07:55:00Z"), + }, + new TimeSeriesPoint(1672536) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T08:00:00Z"), + }, + new TimeSeriesPoint(1672544) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T08:05:00Z"), + }, + new TimeSeriesPoint(1672364) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T08:10:00Z"), + }, + new TimeSeriesPoint(1672912) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T08:15:00Z"), + }, + new TimeSeriesPoint(1672736) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T08:20:00Z"), + }, + new TimeSeriesPoint(1672725) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T08:25:00Z"), + }, + new TimeSeriesPoint(1673247) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T08:30:00Z"), + }, + new TimeSeriesPoint(1673109) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T08:35:00Z"), + }, + new TimeSeriesPoint(1690088) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T08:40:00Z"), + }, + new TimeSeriesPoint(1703865) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T08:45:00Z"), + }, + new TimeSeriesPoint(1703865) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T08:50:00Z"), + }, + new TimeSeriesPoint(1786581) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T08:55:00Z"), + }, + new TimeSeriesPoint(1800945) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T09:00:00Z"), + }, + new TimeSeriesPoint(1800957) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T09:05:00Z"), + }, + new TimeSeriesPoint(1801191) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T09:10:00Z"), + }, + new TimeSeriesPoint(1801412) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T09:15:00Z"), + }, + new TimeSeriesPoint(1801621) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T09:20:00Z"), + }, + new TimeSeriesPoint(1801621) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T09:25:00Z"), + }, + new TimeSeriesPoint(1801654) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T09:30:00Z"), + }, + new TimeSeriesPoint(1802105) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T09:35:00Z"), + }, + new TimeSeriesPoint(1801800) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T09:40:00Z"), + }, + new TimeSeriesPoint(1803040) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T09:45:00Z"), + }, + new TimeSeriesPoint(1803672) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T09:50:00Z"), + }, + new TimeSeriesPoint(1803535) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T09:55:00Z"), + }, + new TimeSeriesPoint(1803541) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T10:00:00Z"), + }, + new TimeSeriesPoint(1803545) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T10:05:00Z"), + }, + new TimeSeriesPoint(1803599) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T10:10:00Z"), + }, + new TimeSeriesPoint(1803616) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T10:15:00Z"), + }, + new TimeSeriesPoint(1803619) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T10:20:00Z"), + }, + new TimeSeriesPoint(1809942) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T10:25:00Z"), + }, + new TimeSeriesPoint(1802720) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T10:30:00Z"), + }, + new TimeSeriesPoint(1802720) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T10:35:00Z"), + }, + new TimeSeriesPoint(1802888) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T10:40:00Z"), + }, + new TimeSeriesPoint(1809574) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T10:45:00Z"), + }, + new TimeSeriesPoint(1803896) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T10:50:00Z"), + }, + new TimeSeriesPoint(1803850) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T10:55:00Z"), + }, + new TimeSeriesPoint(1803854) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T11:00:00Z"), + }, + new TimeSeriesPoint(1803854) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T11:05:00Z"), + }, + new TimeSeriesPoint(1803797) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T11:10:00Z"), + }, + new TimeSeriesPoint(1803921) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T11:15:00Z"), + }, + new TimeSeriesPoint(1803933) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T11:20:00Z"), + }, + new TimeSeriesPoint(1804040) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T11:25:00Z"), + }, + new TimeSeriesPoint(1804044) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T11:30:00Z"), + }, + new TimeSeriesPoint(1804070) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T11:35:00Z"), + }, + new TimeSeriesPoint(1804070) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T11:40:00Z"), + }, + new TimeSeriesPoint(1804068) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T11:45:00Z"), + }, + new TimeSeriesPoint(1804073) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T11:50:00Z"), + }, + new TimeSeriesPoint(1804101) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T11:55:00Z"), + }, + new TimeSeriesPoint(1804674) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T12:00:00Z"), + }, + new TimeSeriesPoint(1804714) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T12:05:00Z"), + }, + new TimeSeriesPoint(1804730) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T12:10:00Z"), + }, + new TimeSeriesPoint(1804816) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T12:15:00Z"), + }, + new TimeSeriesPoint(1803996) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T12:20:00Z"), + }, + new TimeSeriesPoint(1803998) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T12:25:00Z"), + }, + new TimeSeriesPoint(1804015) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T12:30:00Z"), + }, + new TimeSeriesPoint(1804047) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T12:35:00Z"), + }, + new TimeSeriesPoint(1804050) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T12:40:00Z"), + }, + new TimeSeriesPoint(1804218) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T12:45:00Z"), + }, + new TimeSeriesPoint(1804217) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T12:50:00Z"), + }, + new TimeSeriesPoint(1804217) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T12:55:00Z"), + }, + new TimeSeriesPoint(1804205) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T13:00:00Z"), + }, + new TimeSeriesPoint(1804728) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T13:05:00Z"), + }, + new TimeSeriesPoint(1804748) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T13:10:00Z"), + }, + new TimeSeriesPoint(1805232) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T13:15:00Z"), + }, + new TimeSeriesPoint(1814121) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T13:20:00Z"), + }, + new TimeSeriesPoint(1806789) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T13:25:00Z"), + }, + new TimeSeriesPoint(1806119) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T13:30:00Z"), + }, + new TimeSeriesPoint(1806329) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T13:35:00Z"), + }, + new TimeSeriesPoint(1806454) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T13:40:00Z"), + }, + new TimeSeriesPoint(1806852) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T13:45:00Z"), + }, + new TimeSeriesPoint(1807347) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T13:50:00Z"), + }, + new TimeSeriesPoint(1812144) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T13:55:00Z"), + }, + new TimeSeriesPoint(1807418) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T14:00:00Z"), + }, + new TimeSeriesPoint(1807418) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T14:05:00Z"), + }, + new TimeSeriesPoint(1807432) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T14:10:00Z"), + }, + new TimeSeriesPoint(1808540) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T14:15:00Z"), + }, + new TimeSeriesPoint(1808541) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T14:20:00Z"), + }, + new TimeSeriesPoint(1807831) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T14:25:00Z"), + }, + new TimeSeriesPoint(1807852) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T14:30:00Z"), + }, + new TimeSeriesPoint(1807811) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T14:35:00Z"), + }, + new TimeSeriesPoint(2214285) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T14:40:00Z"), + }, + new TimeSeriesPoint(2215019) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T14:45:00Z"), + }, + new TimeSeriesPoint(2215329) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T14:50:00Z"), + }, + new TimeSeriesPoint(2215097) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T14:55:00Z"), + }, + new TimeSeriesPoint(2215129) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T15:00:00Z"), + }, + new TimeSeriesPoint(2215120) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T15:05:00Z"), + }, + new TimeSeriesPoint(2217056) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T15:10:00Z"), + }, + new TimeSeriesPoint(2217056) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T15:15:00Z"), + }, + new TimeSeriesPoint(2222126) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T15:20:00Z"), + }, + new TimeSeriesPoint(2226472) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T15:25:00Z"), + }, + new TimeSeriesPoint(2226722) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T15:30:00Z"), + }, + new TimeSeriesPoint(2226729) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T15:35:00Z"), + }, + new TimeSeriesPoint(2226735) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T15:40:00Z"), + }, + new TimeSeriesPoint(2226735) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T15:45:00Z"), + }, + new TimeSeriesPoint(2226735) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T15:50:00Z"), + }, + new TimeSeriesPoint(2226952) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T15:55:00Z"), + }, + new TimeSeriesPoint(2226962) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T16:00:00Z"), + }, + new TimeSeriesPoint(2649337) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T16:05:00Z"), + }, + new TimeSeriesPoint(2092796) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T16:10:00Z"), + }, + new TimeSeriesPoint(2092839) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T16:15:00Z"), + }, + new TimeSeriesPoint(2092940) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T16:20:00Z"), + }, + new TimeSeriesPoint(2092940) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T16:25:00Z"), + }, + new TimeSeriesPoint(2092965) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T16:30:00Z"), + }, + new TimeSeriesPoint(2092979) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T16:35:00Z"), + }, + new TimeSeriesPoint(2095588) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T16:40:00Z"), + }, + new TimeSeriesPoint(2099586) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T16:45:00Z"), + }, + new TimeSeriesPoint(2102981) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T16:50:00Z"), + }, + new TimeSeriesPoint(2108053) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T16:55:00Z"), + }, + new TimeSeriesPoint(2107907) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T17:00:00Z"), + }, + new TimeSeriesPoint(2108241) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T17:05:00Z"), + }, + new TimeSeriesPoint(2100321) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T17:10:00Z"), + }, + new TimeSeriesPoint(2100448) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T17:15:00Z"), + }, + new TimeSeriesPoint(2100483) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T17:20:00Z"), + }, + new TimeSeriesPoint(2103042) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T17:25:00Z"), + }, + new TimeSeriesPoint(2103037) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T17:30:00Z"), + }, + new TimeSeriesPoint(2103040) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T17:35:00Z"), + }, + new TimeSeriesPoint(2103054) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T17:40:00Z"), + }, + new TimeSeriesPoint(2103058) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T17:45:00Z"), + }, + new TimeSeriesPoint(1830757) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T17:50:00Z"), + }, + new TimeSeriesPoint(1830855) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T17:55:00Z"), + }, + new TimeSeriesPoint(1831495) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T18:00:00Z"), + }, + new TimeSeriesPoint(1831463) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T18:05:00Z"), + }, + new TimeSeriesPoint(1831963) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T18:10:00Z"), + }, + new TimeSeriesPoint(1832046) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T18:15:00Z"), + }, + new TimeSeriesPoint(1832070) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T18:20:00Z"), + }, + new TimeSeriesPoint(1835511) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T18:25:00Z"), + }, + new TimeSeriesPoint(1835265) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T18:30:00Z"), + }, + new TimeSeriesPoint(1835481) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T18:35:00Z"), + }, + new TimeSeriesPoint(1835578) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T18:40:00Z"), + }, + new TimeSeriesPoint(1835611) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T18:45:00Z"), + }, + new TimeSeriesPoint(1836314) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T18:50:00Z"), + }, + new TimeSeriesPoint(1836369) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T18:55:00Z"), + }, + new TimeSeriesPoint(1837280) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T19:00:00Z"), + }, + new TimeSeriesPoint(1842939) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T19:05:00Z"), + }, + new TimeSeriesPoint(1843126) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T19:10:00Z"), + }, + new TimeSeriesPoint(1845840) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T19:15:00Z"), + }, + new TimeSeriesPoint(1842444) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T19:20:00Z"), + }, + new TimeSeriesPoint(1839891) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T19:25:00Z"), + }, + new TimeSeriesPoint(1839875) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T19:30:00Z"), + }, + new TimeSeriesPoint(1839870) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T19:35:00Z"), + }, + new TimeSeriesPoint(1840090) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T19:40:00Z"), + }, + new TimeSeriesPoint(1840479) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T19:45:00Z"), + }, + new TimeSeriesPoint(1840479) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T19:50:00Z"), + }, + new TimeSeriesPoint(1840482) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T19:55:00Z"), + }, + new TimeSeriesPoint(1841522) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T20:00:00Z"), + }, + new TimeSeriesPoint(1841836) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T20:05:00Z"), + }, + new TimeSeriesPoint(1842377) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T20:10:00Z"), + }, + new TimeSeriesPoint(1842388) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T20:15:00Z"), + }, + new TimeSeriesPoint(1842489) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T20:20:00Z"), + }, + new TimeSeriesPoint(1842489) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T20:25:00Z"), + }, + new TimeSeriesPoint(1842489) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T20:30:00Z"), + }, + new TimeSeriesPoint(1842496) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T20:35:00Z"), + }, + new TimeSeriesPoint(1842689) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T20:40:00Z"), + }, + new TimeSeriesPoint(1843117) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T20:45:00Z"), + }, + new TimeSeriesPoint(1843116) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T20:50:00Z"), + }, + new TimeSeriesPoint(1843227) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T20:55:00Z"), + }, + new TimeSeriesPoint(1843138) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T21:00:00Z"), + }, + new TimeSeriesPoint(1843141) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T21:05:00Z"), + }, + new TimeSeriesPoint(1843310) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T21:10:00Z"), + }, + new TimeSeriesPoint(1843310) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T21:15:00Z"), + }, + new TimeSeriesPoint(1843507) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T21:20:00Z"), + }, + new TimeSeriesPoint(1843953) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T21:25:00Z"), + }, + new TimeSeriesPoint(1844778) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T21:30:00Z"), + }, + new TimeSeriesPoint(1843918) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T21:35:00Z"), + }, + new TimeSeriesPoint(1882692) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T21:40:00Z"), + }, + new TimeSeriesPoint(1974888) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T21:45:00Z"), + }, + new TimeSeriesPoint(2157136) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T21:50:00Z"), + }, + new TimeSeriesPoint(2154987) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T21:55:00Z"), + }, + new TimeSeriesPoint(2155664) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T22:00:00Z"), + }, + new TimeSeriesPoint(2155660) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T22:05:00Z"), + }, + new TimeSeriesPoint(2155824) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T22:10:00Z"), + }, + new TimeSeriesPoint(2155824) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T22:15:00Z"), + }, + new TimeSeriesPoint(2156329) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T22:20:00Z"), + }, + new TimeSeriesPoint(2156479) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T22:25:00Z"), + }, + new TimeSeriesPoint(2165269) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T22:30:00Z"), + }, + new TimeSeriesPoint(2165433) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T22:35:00Z"), + }, + new TimeSeriesPoint(2165739) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T22:40:00Z"), + }, + new TimeSeriesPoint(2165931) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T22:45:00Z"), + }, + new TimeSeriesPoint(2165928) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T22:50:00Z"), + }, + new TimeSeriesPoint(2165989) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T22:55:00Z"), + }, + new TimeSeriesPoint(2228961) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T23:00:00Z"), + }, + new TimeSeriesPoint(2228961) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T23:05:00Z"), + }, + new TimeSeriesPoint(2228961) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T23:10:00Z"), + }, + new TimeSeriesPoint(2485802) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T23:15:00Z"), + }, + new TimeSeriesPoint(2485802) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T23:20:00Z"), + }, + new TimeSeriesPoint(2486021) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T23:25:00Z"), + }, + new TimeSeriesPoint(2485293) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T23:30:00Z"), + }, + new TimeSeriesPoint(2485293) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T23:35:00Z"), + }, + new TimeSeriesPoint(2485324) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T23:40:00Z"), + }, + new TimeSeriesPoint(2489142) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T23:45:00Z"), + }, + new TimeSeriesPoint(2526312) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T23:50:00Z"), + }, + new TimeSeriesPoint(2526313) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T23:55:00Z"), + }, + new TimeSeriesPoint(2526314) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T00:00:00Z"), + }, + new TimeSeriesPoint(2526324) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T00:05:00Z"), + }, + new TimeSeriesPoint(2526325) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T00:10:00Z"), + }, + new TimeSeriesPoint(2526205) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T00:15:00Z"), + }, + new TimeSeriesPoint(2526226) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T00:20:00Z"), + }, + new TimeSeriesPoint(2526475) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T00:25:00Z"), + }, + new TimeSeriesPoint(2526471) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T00:30:00Z"), + }, + new TimeSeriesPoint(2526471) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T00:35:00Z"), + }, + new TimeSeriesPoint(2526534) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T00:40:00Z"), + }, + new TimeSeriesPoint(2526646) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T00:45:00Z"), + }, + new TimeSeriesPoint(2526646) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T00:50:00Z"), + }, + new TimeSeriesPoint(2526648) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T00:55:00Z"), + }, + new TimeSeriesPoint(2526658) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T01:00:00Z"), + }, + new TimeSeriesPoint(2526771) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T01:05:00Z"), + }, + new TimeSeriesPoint(2526773) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T01:10:00Z"), + }, + new TimeSeriesPoint(2526793) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T01:15:00Z"), + }, + new TimeSeriesPoint(2527010) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T01:20:00Z"), + }, + new TimeSeriesPoint(2527031) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T01:25:00Z"), + }, + new TimeSeriesPoint(3178096) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T01:30:00Z"), + }, + new TimeSeriesPoint(3196305) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T01:35:00Z"), + }, + new TimeSeriesPoint(3196202) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T01:40:00Z"), + }, + new TimeSeriesPoint(3196202) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T01:45:00Z"), + }, + new TimeSeriesPoint(3196205) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T01:50:00Z"), + }, + new TimeSeriesPoint(3229232) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T01:55:00Z"), + }, + new TimeSeriesPoint(3230463) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T02:00:00Z"), + }, + new TimeSeriesPoint(3230468) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T02:05:00Z"), + }, + new TimeSeriesPoint(3230468) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T02:10:00Z"), + }, + new TimeSeriesPoint(3230468) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T02:15:00Z"), + }, + new TimeSeriesPoint(3230470) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T02:20:00Z"), + }, + new TimeSeriesPoint(3230467) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T02:25:00Z"), + }, + new TimeSeriesPoint(3230506) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T02:30:00Z"), + }, + new TimeSeriesPoint(3231536) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T02:35:00Z"), + }, + new TimeSeriesPoint(3230723) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T02:40:00Z"), + }, + new TimeSeriesPoint(3230727) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T02:45:00Z"), + }, + new TimeSeriesPoint(3230727) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T02:50:00Z"), + }, + new TimeSeriesPoint(3230727) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T02:55:00Z"), + }, + new TimeSeriesPoint(3231880) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T03:00:00Z"), + }, + new TimeSeriesPoint(3232283) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T03:05:00Z"), + }, + new TimeSeriesPoint(3232283) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T03:10:00Z"), + }, + new TimeSeriesPoint(3232283) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T03:15:00Z"), + }, + new TimeSeriesPoint(3232325) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T03:20:00Z"), + }, + new TimeSeriesPoint(3232323) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T03:25:00Z"), + }, + new TimeSeriesPoint(3232327) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T03:30:00Z"), + }, + new TimeSeriesPoint(3232340) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T03:35:00Z"), + }, + new TimeSeriesPoint(3232713) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T03:40:00Z"), + }, + new TimeSeriesPoint(3232729) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T03:45:00Z"), + }, + new TimeSeriesPoint(3232756) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T03:50:00Z"), + }, + new TimeSeriesPoint(3233500) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T03:55:00Z"), + }, + new TimeSeriesPoint(3233500) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T04:00:00Z"), + }, + new TimeSeriesPoint(3233500) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T04:05:00Z"), + } +}, TimeGranularity.PerMinute) +{ + CustomInterval = 5, + Period = 0, + StableTrendWindow = 10, + Threshold = (float)0.99, +}; +Response response = await client.DetectUnivariateChangePointAsync(options); +]]> + + + +This sample shows how to call DetectUnivariateChangePoint. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); + +UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[] +{ + new TimeSeriesPoint(1639196) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T06:45:00Z"), + }, + new TimeSeriesPoint(1639290) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T06:50:00Z"), + }, + new TimeSeriesPoint(1667293) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T06:55:00Z"), + }, + new TimeSeriesPoint(1703130) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T07:00:00Z"), + }, + new TimeSeriesPoint(1650912) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T07:05:00Z"), + }, + new TimeSeriesPoint(1653596) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T07:10:00Z"), + }, + new TimeSeriesPoint(1653793) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T07:15:00Z"), + }, + new TimeSeriesPoint(1653795) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T07:20:00Z"), + }, + new TimeSeriesPoint(1663471) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T07:25:00Z"), + }, + new TimeSeriesPoint(1662358) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T07:30:00Z"), + }, + new TimeSeriesPoint(1664320) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T07:35:00Z"), + }, + new TimeSeriesPoint(1664942) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T07:40:00Z"), + }, + new TimeSeriesPoint(1664966) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T07:45:00Z"), + }, + new TimeSeriesPoint(1724271) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T07:50:00Z"), + }, + new TimeSeriesPoint(1678720) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T07:55:00Z"), + }, + new TimeSeriesPoint(1672536) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T08:00:00Z"), + }, + new TimeSeriesPoint(1672544) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T08:05:00Z"), + }, + new TimeSeriesPoint(1672364) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T08:10:00Z"), + }, + new TimeSeriesPoint(1672912) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T08:15:00Z"), + }, + new TimeSeriesPoint(1672736) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T08:20:00Z"), + }, + new TimeSeriesPoint(1672725) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T08:25:00Z"), + }, + new TimeSeriesPoint(1673247) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T08:30:00Z"), + }, + new TimeSeriesPoint(1673109) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T08:35:00Z"), + }, + new TimeSeriesPoint(1690088) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T08:40:00Z"), + }, + new TimeSeriesPoint(1703865) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T08:45:00Z"), + }, + new TimeSeriesPoint(1703865) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T08:50:00Z"), + }, + new TimeSeriesPoint(1786581) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T08:55:00Z"), + }, + new TimeSeriesPoint(1800945) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T09:00:00Z"), + }, + new TimeSeriesPoint(1800957) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T09:05:00Z"), + }, + new TimeSeriesPoint(1801191) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T09:10:00Z"), + }, + new TimeSeriesPoint(1801412) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T09:15:00Z"), + }, + new TimeSeriesPoint(1801621) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T09:20:00Z"), + }, + new TimeSeriesPoint(1801621) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T09:25:00Z"), + }, + new TimeSeriesPoint(1801654) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T09:30:00Z"), + }, + new TimeSeriesPoint(1802105) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T09:35:00Z"), + }, + new TimeSeriesPoint(1801800) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T09:40:00Z"), + }, + new TimeSeriesPoint(1803040) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T09:45:00Z"), + }, + new TimeSeriesPoint(1803672) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T09:50:00Z"), + }, + new TimeSeriesPoint(1803535) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T09:55:00Z"), + }, + new TimeSeriesPoint(1803541) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T10:00:00Z"), + }, + new TimeSeriesPoint(1803545) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T10:05:00Z"), + }, + new TimeSeriesPoint(1803599) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T10:10:00Z"), + }, + new TimeSeriesPoint(1803616) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T10:15:00Z"), + }, + new TimeSeriesPoint(1803619) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T10:20:00Z"), + }, + new TimeSeriesPoint(1809942) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T10:25:00Z"), + }, + new TimeSeriesPoint(1802720) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T10:30:00Z"), + }, + new TimeSeriesPoint(1802720) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T10:35:00Z"), + }, + new TimeSeriesPoint(1802888) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T10:40:00Z"), + }, + new TimeSeriesPoint(1809574) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T10:45:00Z"), + }, + new TimeSeriesPoint(1803896) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T10:50:00Z"), + }, + new TimeSeriesPoint(1803850) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T10:55:00Z"), + }, + new TimeSeriesPoint(1803854) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T11:00:00Z"), + }, + new TimeSeriesPoint(1803854) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T11:05:00Z"), + }, + new TimeSeriesPoint(1803797) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T11:10:00Z"), + }, + new TimeSeriesPoint(1803921) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T11:15:00Z"), + }, + new TimeSeriesPoint(1803933) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T11:20:00Z"), + }, + new TimeSeriesPoint(1804040) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T11:25:00Z"), + }, + new TimeSeriesPoint(1804044) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T11:30:00Z"), + }, + new TimeSeriesPoint(1804070) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T11:35:00Z"), + }, + new TimeSeriesPoint(1804070) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T11:40:00Z"), + }, + new TimeSeriesPoint(1804068) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T11:45:00Z"), + }, + new TimeSeriesPoint(1804073) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T11:50:00Z"), + }, + new TimeSeriesPoint(1804101) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T11:55:00Z"), + }, + new TimeSeriesPoint(1804674) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T12:00:00Z"), + }, + new TimeSeriesPoint(1804714) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T12:05:00Z"), + }, + new TimeSeriesPoint(1804730) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T12:10:00Z"), + }, + new TimeSeriesPoint(1804816) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T12:15:00Z"), + }, + new TimeSeriesPoint(1803996) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T12:20:00Z"), + }, + new TimeSeriesPoint(1803998) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T12:25:00Z"), + }, + new TimeSeriesPoint(1804015) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T12:30:00Z"), + }, + new TimeSeriesPoint(1804047) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T12:35:00Z"), + }, + new TimeSeriesPoint(1804050) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T12:40:00Z"), + }, + new TimeSeriesPoint(1804218) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T12:45:00Z"), + }, + new TimeSeriesPoint(1804217) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T12:50:00Z"), + }, + new TimeSeriesPoint(1804217) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T12:55:00Z"), + }, + new TimeSeriesPoint(1804205) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T13:00:00Z"), + }, + new TimeSeriesPoint(1804728) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T13:05:00Z"), + }, + new TimeSeriesPoint(1804748) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T13:10:00Z"), + }, + new TimeSeriesPoint(1805232) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T13:15:00Z"), + }, + new TimeSeriesPoint(1814121) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T13:20:00Z"), + }, + new TimeSeriesPoint(1806789) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T13:25:00Z"), + }, + new TimeSeriesPoint(1806119) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T13:30:00Z"), + }, + new TimeSeriesPoint(1806329) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T13:35:00Z"), + }, + new TimeSeriesPoint(1806454) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T13:40:00Z"), + }, + new TimeSeriesPoint(1806852) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T13:45:00Z"), + }, + new TimeSeriesPoint(1807347) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T13:50:00Z"), + }, + new TimeSeriesPoint(1812144) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T13:55:00Z"), + }, + new TimeSeriesPoint(1807418) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T14:00:00Z"), + }, + new TimeSeriesPoint(1807418) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T14:05:00Z"), + }, + new TimeSeriesPoint(1807432) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T14:10:00Z"), + }, + new TimeSeriesPoint(1808540) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T14:15:00Z"), + }, + new TimeSeriesPoint(1808541) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T14:20:00Z"), + }, + new TimeSeriesPoint(1807831) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T14:25:00Z"), + }, + new TimeSeriesPoint(1807852) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T14:30:00Z"), + }, + new TimeSeriesPoint(1807811) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T14:35:00Z"), + }, + new TimeSeriesPoint(2214285) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T14:40:00Z"), + }, + new TimeSeriesPoint(2215019) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T14:45:00Z"), + }, + new TimeSeriesPoint(2215329) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T14:50:00Z"), + }, + new TimeSeriesPoint(2215097) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T14:55:00Z"), + }, + new TimeSeriesPoint(2215129) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T15:00:00Z"), + }, + new TimeSeriesPoint(2215120) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T15:05:00Z"), + }, + new TimeSeriesPoint(2217056) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T15:10:00Z"), + }, + new TimeSeriesPoint(2217056) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T15:15:00Z"), + }, + new TimeSeriesPoint(2222126) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T15:20:00Z"), + }, + new TimeSeriesPoint(2226472) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T15:25:00Z"), + }, + new TimeSeriesPoint(2226722) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T15:30:00Z"), + }, + new TimeSeriesPoint(2226729) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T15:35:00Z"), + }, + new TimeSeriesPoint(2226735) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T15:40:00Z"), + }, + new TimeSeriesPoint(2226735) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T15:45:00Z"), + }, + new TimeSeriesPoint(2226735) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T15:50:00Z"), + }, + new TimeSeriesPoint(2226952) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T15:55:00Z"), + }, + new TimeSeriesPoint(2226962) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T16:00:00Z"), + }, + new TimeSeriesPoint(2649337) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T16:05:00Z"), + }, + new TimeSeriesPoint(2092796) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T16:10:00Z"), + }, + new TimeSeriesPoint(2092839) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T16:15:00Z"), + }, + new TimeSeriesPoint(2092940) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T16:20:00Z"), + }, + new TimeSeriesPoint(2092940) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T16:25:00Z"), + }, + new TimeSeriesPoint(2092965) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T16:30:00Z"), + }, + new TimeSeriesPoint(2092979) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T16:35:00Z"), + }, + new TimeSeriesPoint(2095588) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T16:40:00Z"), + }, + new TimeSeriesPoint(2099586) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T16:45:00Z"), + }, + new TimeSeriesPoint(2102981) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T16:50:00Z"), + }, + new TimeSeriesPoint(2108053) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T16:55:00Z"), + }, + new TimeSeriesPoint(2107907) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T17:00:00Z"), + }, + new TimeSeriesPoint(2108241) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T17:05:00Z"), + }, + new TimeSeriesPoint(2100321) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T17:10:00Z"), + }, + new TimeSeriesPoint(2100448) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T17:15:00Z"), + }, + new TimeSeriesPoint(2100483) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T17:20:00Z"), + }, + new TimeSeriesPoint(2103042) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T17:25:00Z"), + }, + new TimeSeriesPoint(2103037) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T17:30:00Z"), + }, + new TimeSeriesPoint(2103040) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T17:35:00Z"), + }, + new TimeSeriesPoint(2103054) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T17:40:00Z"), + }, + new TimeSeriesPoint(2103058) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T17:45:00Z"), + }, + new TimeSeriesPoint(1830757) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T17:50:00Z"), + }, + new TimeSeriesPoint(1830855) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T17:55:00Z"), + }, + new TimeSeriesPoint(1831495) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T18:00:00Z"), + }, + new TimeSeriesPoint(1831463) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T18:05:00Z"), + }, + new TimeSeriesPoint(1831963) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T18:10:00Z"), + }, + new TimeSeriesPoint(1832046) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T18:15:00Z"), + }, + new TimeSeriesPoint(1832070) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T18:20:00Z"), + }, + new TimeSeriesPoint(1835511) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T18:25:00Z"), + }, + new TimeSeriesPoint(1835265) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T18:30:00Z"), + }, + new TimeSeriesPoint(1835481) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T18:35:00Z"), + }, + new TimeSeriesPoint(1835578) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T18:40:00Z"), + }, + new TimeSeriesPoint(1835611) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T18:45:00Z"), + }, + new TimeSeriesPoint(1836314) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T18:50:00Z"), + }, + new TimeSeriesPoint(1836369) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T18:55:00Z"), + }, + new TimeSeriesPoint(1837280) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T19:00:00Z"), + }, + new TimeSeriesPoint(1842939) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T19:05:00Z"), + }, + new TimeSeriesPoint(1843126) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T19:10:00Z"), + }, + new TimeSeriesPoint(1845840) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T19:15:00Z"), + }, + new TimeSeriesPoint(1842444) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T19:20:00Z"), + }, + new TimeSeriesPoint(1839891) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T19:25:00Z"), + }, + new TimeSeriesPoint(1839875) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T19:30:00Z"), + }, + new TimeSeriesPoint(1839870) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T19:35:00Z"), + }, + new TimeSeriesPoint(1840090) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T19:40:00Z"), + }, + new TimeSeriesPoint(1840479) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T19:45:00Z"), + }, + new TimeSeriesPoint(1840479) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T19:50:00Z"), + }, + new TimeSeriesPoint(1840482) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T19:55:00Z"), + }, + new TimeSeriesPoint(1841522) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T20:00:00Z"), + }, + new TimeSeriesPoint(1841836) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T20:05:00Z"), + }, + new TimeSeriesPoint(1842377) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T20:10:00Z"), + }, + new TimeSeriesPoint(1842388) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T20:15:00Z"), + }, + new TimeSeriesPoint(1842489) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T20:20:00Z"), + }, + new TimeSeriesPoint(1842489) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T20:25:00Z"), + }, + new TimeSeriesPoint(1842489) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T20:30:00Z"), + }, + new TimeSeriesPoint(1842496) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T20:35:00Z"), + }, + new TimeSeriesPoint(1842689) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T20:40:00Z"), + }, + new TimeSeriesPoint(1843117) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T20:45:00Z"), + }, + new TimeSeriesPoint(1843116) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T20:50:00Z"), + }, + new TimeSeriesPoint(1843227) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T20:55:00Z"), + }, + new TimeSeriesPoint(1843138) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T21:00:00Z"), + }, + new TimeSeriesPoint(1843141) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T21:05:00Z"), + }, + new TimeSeriesPoint(1843310) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T21:10:00Z"), + }, + new TimeSeriesPoint(1843310) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T21:15:00Z"), + }, + new TimeSeriesPoint(1843507) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T21:20:00Z"), + }, + new TimeSeriesPoint(1843953) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T21:25:00Z"), + }, + new TimeSeriesPoint(1844778) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T21:30:00Z"), + }, + new TimeSeriesPoint(1843918) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T21:35:00Z"), + }, + new TimeSeriesPoint(1882692) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T21:40:00Z"), + }, + new TimeSeriesPoint(1974888) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T21:45:00Z"), + }, + new TimeSeriesPoint(2157136) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T21:50:00Z"), + }, + new TimeSeriesPoint(2154987) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T21:55:00Z"), + }, + new TimeSeriesPoint(2155664) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T22:00:00Z"), + }, + new TimeSeriesPoint(2155660) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T22:05:00Z"), + }, + new TimeSeriesPoint(2155824) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T22:10:00Z"), + }, + new TimeSeriesPoint(2155824) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T22:15:00Z"), + }, + new TimeSeriesPoint(2156329) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T22:20:00Z"), + }, + new TimeSeriesPoint(2156479) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T22:25:00Z"), + }, + new TimeSeriesPoint(2165269) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T22:30:00Z"), + }, + new TimeSeriesPoint(2165433) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T22:35:00Z"), + }, + new TimeSeriesPoint(2165739) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T22:40:00Z"), + }, + new TimeSeriesPoint(2165931) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T22:45:00Z"), + }, + new TimeSeriesPoint(2165928) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T22:50:00Z"), + }, + new TimeSeriesPoint(2165989) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T22:55:00Z"), + }, + new TimeSeriesPoint(2228961) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T23:00:00Z"), + }, + new TimeSeriesPoint(2228961) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T23:05:00Z"), + }, + new TimeSeriesPoint(2228961) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T23:10:00Z"), + }, + new TimeSeriesPoint(2485802) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T23:15:00Z"), + }, + new TimeSeriesPoint(2485802) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T23:20:00Z"), + }, + new TimeSeriesPoint(2486021) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T23:25:00Z"), + }, + new TimeSeriesPoint(2485293) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T23:30:00Z"), + }, + new TimeSeriesPoint(2485293) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T23:35:00Z"), + }, + new TimeSeriesPoint(2485324) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T23:40:00Z"), + }, + new TimeSeriesPoint(2489142) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T23:45:00Z"), + }, + new TimeSeriesPoint(2526312) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T23:50:00Z"), + }, + new TimeSeriesPoint(2526313) + { + Timestamp = DateTimeOffset.Parse("2017-01-01T23:55:00Z"), + }, + new TimeSeriesPoint(2526314) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T00:00:00Z"), + }, + new TimeSeriesPoint(2526324) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T00:05:00Z"), + }, + new TimeSeriesPoint(2526325) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T00:10:00Z"), + }, + new TimeSeriesPoint(2526205) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T00:15:00Z"), + }, + new TimeSeriesPoint(2526226) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T00:20:00Z"), + }, + new TimeSeriesPoint(2526475) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T00:25:00Z"), + }, + new TimeSeriesPoint(2526471) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T00:30:00Z"), + }, + new TimeSeriesPoint(2526471) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T00:35:00Z"), + }, + new TimeSeriesPoint(2526534) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T00:40:00Z"), + }, + new TimeSeriesPoint(2526646) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T00:45:00Z"), + }, + new TimeSeriesPoint(2526646) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T00:50:00Z"), + }, + new TimeSeriesPoint(2526648) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T00:55:00Z"), + }, + new TimeSeriesPoint(2526658) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T01:00:00Z"), + }, + new TimeSeriesPoint(2526771) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T01:05:00Z"), + }, + new TimeSeriesPoint(2526773) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T01:10:00Z"), + }, + new TimeSeriesPoint(2526793) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T01:15:00Z"), + }, + new TimeSeriesPoint(2527010) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T01:20:00Z"), + }, + new TimeSeriesPoint(2527031) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T01:25:00Z"), + }, + new TimeSeriesPoint(3178096) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T01:30:00Z"), + }, + new TimeSeriesPoint(3196305) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T01:35:00Z"), + }, + new TimeSeriesPoint(3196202) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T01:40:00Z"), + }, + new TimeSeriesPoint(3196202) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T01:45:00Z"), + }, + new TimeSeriesPoint(3196205) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T01:50:00Z"), + }, + new TimeSeriesPoint(3229232) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T01:55:00Z"), + }, + new TimeSeriesPoint(3230463) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T02:00:00Z"), + }, + new TimeSeriesPoint(3230468) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T02:05:00Z"), + }, + new TimeSeriesPoint(3230468) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T02:10:00Z"), + }, + new TimeSeriesPoint(3230468) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T02:15:00Z"), + }, + new TimeSeriesPoint(3230470) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T02:20:00Z"), + }, + new TimeSeriesPoint(3230467) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T02:25:00Z"), + }, + new TimeSeriesPoint(3230506) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T02:30:00Z"), + }, + new TimeSeriesPoint(3231536) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T02:35:00Z"), + }, + new TimeSeriesPoint(3230723) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T02:40:00Z"), + }, + new TimeSeriesPoint(3230727) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T02:45:00Z"), + }, + new TimeSeriesPoint(3230727) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T02:50:00Z"), + }, + new TimeSeriesPoint(3230727) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T02:55:00Z"), + }, + new TimeSeriesPoint(3231880) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T03:00:00Z"), + }, + new TimeSeriesPoint(3232283) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T03:05:00Z"), + }, + new TimeSeriesPoint(3232283) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T03:10:00Z"), + }, + new TimeSeriesPoint(3232283) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T03:15:00Z"), + }, + new TimeSeriesPoint(3232325) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T03:20:00Z"), + }, + new TimeSeriesPoint(3232323) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T03:25:00Z"), + }, + new TimeSeriesPoint(3232327) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T03:30:00Z"), + }, + new TimeSeriesPoint(3232340) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T03:35:00Z"), + }, + new TimeSeriesPoint(3232713) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T03:40:00Z"), + }, + new TimeSeriesPoint(3232729) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T03:45:00Z"), + }, + new TimeSeriesPoint(3232756) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T03:50:00Z"), + }, + new TimeSeriesPoint(3233500) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T03:55:00Z"), + }, + new TimeSeriesPoint(3233500) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T04:00:00Z"), + }, + new TimeSeriesPoint(3233500) + { + Timestamp = DateTimeOffset.Parse("2017-01-02T04:05:00Z"), + } +}, TimeGranularity.PerMinute) +{ + CustomInterval = 5, + Period = 0, + StableTrendWindow = 10, + Threshold = (float)0.99, +}; +Response response = client.DetectUnivariateChangePoint(options); +]]> + + + +This sample shows how to call DetectUnivariateChangePointAsync and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); + +using RequestContent content = RequestContent.Create(new +{ + series = new object[] + { + new + { + timestamp = "2017-01-01T06:45:00Z", + value = 1639196, + }, + new + { + timestamp = "2017-01-01T06:50:00Z", + value = 1639290, + }, + new + { + timestamp = "2017-01-01T06:55:00Z", + value = 1667293, + }, + new + { + timestamp = "2017-01-01T07:00:00Z", + value = 1703130, + }, + new + { + timestamp = "2017-01-01T07:05:00Z", + value = 1650912, + }, + new + { + timestamp = "2017-01-01T07:10:00Z", + value = 1653596, + }, + new + { + timestamp = "2017-01-01T07:15:00Z", + value = 1653793, + }, + new + { + timestamp = "2017-01-01T07:20:00Z", + value = 1653795, + }, + new + { + timestamp = "2017-01-01T07:25:00Z", + value = 1663471, + }, + new + { + timestamp = "2017-01-01T07:30:00Z", + value = 1662358, + }, + new + { + timestamp = "2017-01-01T07:35:00Z", + value = 1664320, + }, + new + { + timestamp = "2017-01-01T07:40:00Z", + value = 1664942, + }, + new + { + timestamp = "2017-01-01T07:45:00Z", + value = 1664966, + }, + new + { + timestamp = "2017-01-01T07:50:00Z", + value = 1724271, + }, + new + { + timestamp = "2017-01-01T07:55:00Z", + value = 1678720, + }, + new + { + timestamp = "2017-01-01T08:00:00Z", + value = 1672536, + }, + new + { + timestamp = "2017-01-01T08:05:00Z", + value = 1672544, + }, + new + { + timestamp = "2017-01-01T08:10:00Z", + value = 1672364, + }, + new + { + timestamp = "2017-01-01T08:15:00Z", + value = 1672912, + }, + new + { + timestamp = "2017-01-01T08:20:00Z", + value = 1672736, + }, + new + { + timestamp = "2017-01-01T08:25:00Z", + value = 1672725, + }, + new + { + timestamp = "2017-01-01T08:30:00Z", + value = 1673247, + }, + new + { + timestamp = "2017-01-01T08:35:00Z", + value = 1673109, + }, + new + { + timestamp = "2017-01-01T08:40:00Z", + value = 1690088, + }, + new + { + timestamp = "2017-01-01T08:45:00Z", + value = 1703865, + }, + new + { + timestamp = "2017-01-01T08:50:00Z", + value = 1703865, + }, + new + { + timestamp = "2017-01-01T08:55:00Z", + value = 1786581, + }, + new + { + timestamp = "2017-01-01T09:00:00Z", + value = 1800945, + }, + new + { + timestamp = "2017-01-01T09:05:00Z", + value = 1800957, + }, + new + { + timestamp = "2017-01-01T09:10:00Z", + value = 1801191, + }, + new + { + timestamp = "2017-01-01T09:15:00Z", + value = 1801412, + }, + new + { + timestamp = "2017-01-01T09:20:00Z", + value = 1801621, + }, + new + { + timestamp = "2017-01-01T09:25:00Z", + value = 1801621, + }, + new + { + timestamp = "2017-01-01T09:30:00Z", + value = 1801654, + }, + new + { + timestamp = "2017-01-01T09:35:00Z", + value = 1802105, + }, + new + { + timestamp = "2017-01-01T09:40:00Z", + value = 1801800, + }, + new + { + timestamp = "2017-01-01T09:45:00Z", + value = 1803040, + }, + new + { + timestamp = "2017-01-01T09:50:00Z", + value = 1803672, + }, + new + { + timestamp = "2017-01-01T09:55:00Z", + value = 1803535, + }, + new + { + timestamp = "2017-01-01T10:00:00Z", + value = 1803541, + }, + new + { + timestamp = "2017-01-01T10:05:00Z", + value = 1803545, + }, + new + { + timestamp = "2017-01-01T10:10:00Z", + value = 1803599, + }, + new + { + timestamp = "2017-01-01T10:15:00Z", + value = 1803616, + }, + new + { + timestamp = "2017-01-01T10:20:00Z", + value = 1803619, + }, + new + { + timestamp = "2017-01-01T10:25:00Z", + value = 1809942, + }, + new + { + timestamp = "2017-01-01T10:30:00Z", + value = 1802720, + }, + new + { + timestamp = "2017-01-01T10:35:00Z", + value = 1802720, + }, + new + { + timestamp = "2017-01-01T10:40:00Z", + value = 1802888, + }, + new + { + timestamp = "2017-01-01T10:45:00Z", + value = 1809574, + }, + new + { + timestamp = "2017-01-01T10:50:00Z", + value = 1803896, + }, + new + { + timestamp = "2017-01-01T10:55:00Z", + value = 1803850, + }, + new + { + timestamp = "2017-01-01T11:00:00Z", + value = 1803854, + }, + new + { + timestamp = "2017-01-01T11:05:00Z", + value = 1803854, + }, + new + { + timestamp = "2017-01-01T11:10:00Z", + value = 1803797, + }, + new + { + timestamp = "2017-01-01T11:15:00Z", + value = 1803921, + }, + new + { + timestamp = "2017-01-01T11:20:00Z", + value = 1803933, + }, + new + { + timestamp = "2017-01-01T11:25:00Z", + value = 1804040, + }, + new + { + timestamp = "2017-01-01T11:30:00Z", + value = 1804044, + }, + new + { + timestamp = "2017-01-01T11:35:00Z", + value = 1804070, + }, + new + { + timestamp = "2017-01-01T11:40:00Z", + value = 1804070, + }, + new + { + timestamp = "2017-01-01T11:45:00Z", + value = 1804068, + }, + new + { + timestamp = "2017-01-01T11:50:00Z", + value = 1804073, + }, + new + { + timestamp = "2017-01-01T11:55:00Z", + value = 1804101, + }, + new + { + timestamp = "2017-01-01T12:00:00Z", + value = 1804674, + }, + new + { + timestamp = "2017-01-01T12:05:00Z", + value = 1804714, + }, + new + { + timestamp = "2017-01-01T12:10:00Z", + value = 1804730, + }, + new + { + timestamp = "2017-01-01T12:15:00Z", + value = 1804816, + }, + new + { + timestamp = "2017-01-01T12:20:00Z", + value = 1803996, + }, + new + { + timestamp = "2017-01-01T12:25:00Z", + value = 1803998, + }, + new + { + timestamp = "2017-01-01T12:30:00Z", + value = 1804015, + }, + new + { + timestamp = "2017-01-01T12:35:00Z", + value = 1804047, + }, + new + { + timestamp = "2017-01-01T12:40:00Z", + value = 1804050, + }, + new + { + timestamp = "2017-01-01T12:45:00Z", + value = 1804218, + }, + new + { + timestamp = "2017-01-01T12:50:00Z", + value = 1804217, + }, + new + { + timestamp = "2017-01-01T12:55:00Z", + value = 1804217, + }, + new + { + timestamp = "2017-01-01T13:00:00Z", + value = 1804205, + }, + new + { + timestamp = "2017-01-01T13:05:00Z", + value = 1804728, + }, + new + { + timestamp = "2017-01-01T13:10:00Z", + value = 1804748, + }, + new + { + timestamp = "2017-01-01T13:15:00Z", + value = 1805232, + }, + new + { + timestamp = "2017-01-01T13:20:00Z", + value = 1814121, + }, + new + { + timestamp = "2017-01-01T13:25:00Z", + value = 1806789, + }, + new + { + timestamp = "2017-01-01T13:30:00Z", + value = 1806119, + }, + new + { + timestamp = "2017-01-01T13:35:00Z", + value = 1806329, + }, + new + { + timestamp = "2017-01-01T13:40:00Z", + value = 1806454, + }, + new + { + timestamp = "2017-01-01T13:45:00Z", + value = 1806852, + }, + new + { + timestamp = "2017-01-01T13:50:00Z", + value = 1807347, + }, + new + { + timestamp = "2017-01-01T13:55:00Z", + value = 1812144, + }, + new + { + timestamp = "2017-01-01T14:00:00Z", + value = 1807418, + }, + new + { + timestamp = "2017-01-01T14:05:00Z", + value = 1807418, + }, + new + { + timestamp = "2017-01-01T14:10:00Z", + value = 1807432, + }, + new + { + timestamp = "2017-01-01T14:15:00Z", + value = 1808540, + }, + new + { + timestamp = "2017-01-01T14:20:00Z", + value = 1808541, + }, + new + { + timestamp = "2017-01-01T14:25:00Z", + value = 1807831, + }, + new + { + timestamp = "2017-01-01T14:30:00Z", + value = 1807852, + }, + new + { + timestamp = "2017-01-01T14:35:00Z", + value = 1807811, + }, + new + { + timestamp = "2017-01-01T14:40:00Z", + value = 2214285, + }, + new + { + timestamp = "2017-01-01T14:45:00Z", + value = 2215019, + }, + new + { + timestamp = "2017-01-01T14:50:00Z", + value = 2215329, + }, + new + { + timestamp = "2017-01-01T14:55:00Z", + value = 2215097, + }, + new + { + timestamp = "2017-01-01T15:00:00Z", + value = 2215129, + }, + new + { + timestamp = "2017-01-01T15:05:00Z", + value = 2215120, + }, + new + { + timestamp = "2017-01-01T15:10:00Z", + value = 2217056, + }, + new + { + timestamp = "2017-01-01T15:15:00Z", + value = 2217056, + }, + new + { + timestamp = "2017-01-01T15:20:00Z", + value = 2222126, + }, + new + { + timestamp = "2017-01-01T15:25:00Z", + value = 2226472, + }, + new + { + timestamp = "2017-01-01T15:30:00Z", + value = 2226722, + }, + new + { + timestamp = "2017-01-01T15:35:00Z", + value = 2226729, + }, + new + { + timestamp = "2017-01-01T15:40:00Z", + value = 2226735, + }, + new + { + timestamp = "2017-01-01T15:45:00Z", + value = 2226735, + }, + new + { + timestamp = "2017-01-01T15:50:00Z", + value = 2226735, + }, + new + { + timestamp = "2017-01-01T15:55:00Z", + value = 2226952, + }, + new + { + timestamp = "2017-01-01T16:00:00Z", + value = 2226962, + }, + new + { + timestamp = "2017-01-01T16:05:00Z", + value = 2649337, + }, + new + { + timestamp = "2017-01-01T16:10:00Z", + value = 2092796, + }, + new + { + timestamp = "2017-01-01T16:15:00Z", + value = 2092839, + }, + new + { + timestamp = "2017-01-01T16:20:00Z", + value = 2092940, + }, + new + { + timestamp = "2017-01-01T16:25:00Z", + value = 2092940, + }, + new + { + timestamp = "2017-01-01T16:30:00Z", + value = 2092965, + }, + new + { + timestamp = "2017-01-01T16:35:00Z", + value = 2092979, + }, + new + { + timestamp = "2017-01-01T16:40:00Z", + value = 2095588, + }, + new + { + timestamp = "2017-01-01T16:45:00Z", + value = 2099586, + }, + new + { + timestamp = "2017-01-01T16:50:00Z", + value = 2102981, + }, + new + { + timestamp = "2017-01-01T16:55:00Z", + value = 2108053, + }, + new + { + timestamp = "2017-01-01T17:00:00Z", + value = 2107907, + }, + new + { + timestamp = "2017-01-01T17:05:00Z", + value = 2108241, + }, + new + { + timestamp = "2017-01-01T17:10:00Z", + value = 2100321, + }, + new + { + timestamp = "2017-01-01T17:15:00Z", + value = 2100448, + }, + new + { + timestamp = "2017-01-01T17:20:00Z", + value = 2100483, + }, + new + { + timestamp = "2017-01-01T17:25:00Z", + value = 2103042, + }, + new + { + timestamp = "2017-01-01T17:30:00Z", + value = 2103037, + }, + new + { + timestamp = "2017-01-01T17:35:00Z", + value = 2103040, + }, + new + { + timestamp = "2017-01-01T17:40:00Z", + value = 2103054, + }, + new + { + timestamp = "2017-01-01T17:45:00Z", + value = 2103058, + }, + new + { + timestamp = "2017-01-01T17:50:00Z", + value = 1830757, + }, + new + { + timestamp = "2017-01-01T17:55:00Z", + value = 1830855, + }, + new + { + timestamp = "2017-01-01T18:00:00Z", + value = 1831495, + }, + new + { + timestamp = "2017-01-01T18:05:00Z", + value = 1831463, + }, + new + { + timestamp = "2017-01-01T18:10:00Z", + value = 1831963, + }, + new + { + timestamp = "2017-01-01T18:15:00Z", + value = 1832046, + }, + new + { + timestamp = "2017-01-01T18:20:00Z", + value = 1832070, + }, + new + { + timestamp = "2017-01-01T18:25:00Z", + value = 1835511, + }, + new + { + timestamp = "2017-01-01T18:30:00Z", + value = 1835265, + }, + new + { + timestamp = "2017-01-01T18:35:00Z", + value = 1835481, + }, + new + { + timestamp = "2017-01-01T18:40:00Z", + value = 1835578, + }, + new + { + timestamp = "2017-01-01T18:45:00Z", + value = 1835611, + }, + new + { + timestamp = "2017-01-01T18:50:00Z", + value = 1836314, + }, + new + { + timestamp = "2017-01-01T18:55:00Z", + value = 1836369, + }, + new + { + timestamp = "2017-01-01T19:00:00Z", + value = 1837280, + }, + new + { + timestamp = "2017-01-01T19:05:00Z", + value = 1842939, + }, + new + { + timestamp = "2017-01-01T19:10:00Z", + value = 1843126, + }, + new + { + timestamp = "2017-01-01T19:15:00Z", + value = 1845840, + }, + new + { + timestamp = "2017-01-01T19:20:00Z", + value = 1842444, + }, + new + { + timestamp = "2017-01-01T19:25:00Z", + value = 1839891, + }, + new + { + timestamp = "2017-01-01T19:30:00Z", + value = 1839875, + }, + new + { + timestamp = "2017-01-01T19:35:00Z", + value = 1839870, + }, + new + { + timestamp = "2017-01-01T19:40:00Z", + value = 1840090, + }, + new + { + timestamp = "2017-01-01T19:45:00Z", + value = 1840479, + }, + new + { + timestamp = "2017-01-01T19:50:00Z", + value = 1840479, + }, + new + { + timestamp = "2017-01-01T19:55:00Z", + value = 1840482, + }, + new + { + timestamp = "2017-01-01T20:00:00Z", + value = 1841522, + }, + new + { + timestamp = "2017-01-01T20:05:00Z", + value = 1841836, + }, + new + { + timestamp = "2017-01-01T20:10:00Z", + value = 1842377, + }, + new + { + timestamp = "2017-01-01T20:15:00Z", + value = 1842388, + }, + new + { + timestamp = "2017-01-01T20:20:00Z", + value = 1842489, + }, + new + { + timestamp = "2017-01-01T20:25:00Z", + value = 1842489, + }, + new + { + timestamp = "2017-01-01T20:30:00Z", + value = 1842489, + }, + new + { + timestamp = "2017-01-01T20:35:00Z", + value = 1842496, + }, + new + { + timestamp = "2017-01-01T20:40:00Z", + value = 1842689, + }, + new + { + timestamp = "2017-01-01T20:45:00Z", + value = 1843117, + }, + new + { + timestamp = "2017-01-01T20:50:00Z", + value = 1843116, + }, + new + { + timestamp = "2017-01-01T20:55:00Z", + value = 1843227, + }, + new + { + timestamp = "2017-01-01T21:00:00Z", + value = 1843138, + }, + new + { + timestamp = "2017-01-01T21:05:00Z", + value = 1843141, + }, + new + { + timestamp = "2017-01-01T21:10:00Z", + value = 1843310, + }, + new + { + timestamp = "2017-01-01T21:15:00Z", + value = 1843310, + }, + new + { + timestamp = "2017-01-01T21:20:00Z", + value = 1843507, + }, + new + { + timestamp = "2017-01-01T21:25:00Z", + value = 1843953, + }, + new + { + timestamp = "2017-01-01T21:30:00Z", + value = 1844778, + }, + new + { + timestamp = "2017-01-01T21:35:00Z", + value = 1843918, + }, + new + { + timestamp = "2017-01-01T21:40:00Z", + value = 1882692, + }, + new + { + timestamp = "2017-01-01T21:45:00Z", + value = 1974888, + }, + new + { + timestamp = "2017-01-01T21:50:00Z", + value = 2157136, + }, + new + { + timestamp = "2017-01-01T21:55:00Z", + value = 2154987, + }, + new + { + timestamp = "2017-01-01T22:00:00Z", + value = 2155664, + }, + new + { + timestamp = "2017-01-01T22:05:00Z", + value = 2155660, + }, + new + { + timestamp = "2017-01-01T22:10:00Z", + value = 2155824, + }, + new + { + timestamp = "2017-01-01T22:15:00Z", + value = 2155824, + }, + new + { + timestamp = "2017-01-01T22:20:00Z", + value = 2156329, + }, + new + { + timestamp = "2017-01-01T22:25:00Z", + value = 2156479, + }, + new + { + timestamp = "2017-01-01T22:30:00Z", + value = 2165269, + }, + new + { + timestamp = "2017-01-01T22:35:00Z", + value = 2165433, + }, + new + { + timestamp = "2017-01-01T22:40:00Z", + value = 2165739, + }, + new + { + timestamp = "2017-01-01T22:45:00Z", + value = 2165931, + }, + new + { + timestamp = "2017-01-01T22:50:00Z", + value = 2165928, + }, + new + { + timestamp = "2017-01-01T22:55:00Z", + value = 2165989, + }, + new + { + timestamp = "2017-01-01T23:00:00Z", + value = 2228961, + }, + new + { + timestamp = "2017-01-01T23:05:00Z", + value = 2228961, + }, + new + { + timestamp = "2017-01-01T23:10:00Z", + value = 2228961, + }, + new + { + timestamp = "2017-01-01T23:15:00Z", + value = 2485802, + }, + new + { + timestamp = "2017-01-01T23:20:00Z", + value = 2485802, + }, + new + { + timestamp = "2017-01-01T23:25:00Z", + value = 2486021, + }, + new + { + timestamp = "2017-01-01T23:30:00Z", + value = 2485293, + }, + new + { + timestamp = "2017-01-01T23:35:00Z", + value = 2485293, + }, + new + { + timestamp = "2017-01-01T23:40:00Z", + value = 2485324, + }, + new + { + timestamp = "2017-01-01T23:45:00Z", + value = 2489142, + }, + new + { + timestamp = "2017-01-01T23:50:00Z", + value = 2526312, + }, + new + { + timestamp = "2017-01-01T23:55:00Z", + value = 2526313, + }, + new + { + timestamp = "2017-01-02T00:00:00Z", + value = 2526314, + }, + new + { + timestamp = "2017-01-02T00:05:00Z", + value = 2526324, + }, + new + { + timestamp = "2017-01-02T00:10:00Z", + value = 2526325, + }, + new + { + timestamp = "2017-01-02T00:15:00Z", + value = 2526205, + }, + new + { + timestamp = "2017-01-02T00:20:00Z", + value = 2526226, + }, + new + { + timestamp = "2017-01-02T00:25:00Z", + value = 2526475, + }, + new + { + timestamp = "2017-01-02T00:30:00Z", + value = 2526471, + }, + new + { + timestamp = "2017-01-02T00:35:00Z", + value = 2526471, + }, + new + { + timestamp = "2017-01-02T00:40:00Z", + value = 2526534, + }, + new + { + timestamp = "2017-01-02T00:45:00Z", + value = 2526646, + }, + new + { + timestamp = "2017-01-02T00:50:00Z", + value = 2526646, + }, + new + { + timestamp = "2017-01-02T00:55:00Z", + value = 2526648, + }, + new + { + timestamp = "2017-01-02T01:00:00Z", + value = 2526658, + }, + new + { + timestamp = "2017-01-02T01:05:00Z", + value = 2526771, + }, + new + { + timestamp = "2017-01-02T01:10:00Z", + value = 2526773, + }, + new + { + timestamp = "2017-01-02T01:15:00Z", + value = 2526793, + }, + new + { + timestamp = "2017-01-02T01:20:00Z", + value = 2527010, + }, + new + { + timestamp = "2017-01-02T01:25:00Z", + value = 2527031, + }, + new + { + timestamp = "2017-01-02T01:30:00Z", + value = 3178096, + }, + new + { + timestamp = "2017-01-02T01:35:00Z", + value = 3196305, + }, + new + { + timestamp = "2017-01-02T01:40:00Z", + value = 3196202, + }, + new + { + timestamp = "2017-01-02T01:45:00Z", + value = 3196202, + }, + new + { + timestamp = "2017-01-02T01:50:00Z", + value = 3196205, + }, + new + { + timestamp = "2017-01-02T01:55:00Z", + value = 3229232, + }, + new + { + timestamp = "2017-01-02T02:00:00Z", + value = 3230463, + }, + new + { + timestamp = "2017-01-02T02:05:00Z", + value = 3230468, + }, + new + { + timestamp = "2017-01-02T02:10:00Z", + value = 3230468, + }, + new + { + timestamp = "2017-01-02T02:15:00Z", + value = 3230468, + }, + new + { + timestamp = "2017-01-02T02:20:00Z", + value = 3230470, + }, + new + { + timestamp = "2017-01-02T02:25:00Z", + value = 3230467, + }, + new + { + timestamp = "2017-01-02T02:30:00Z", + value = 3230506, + }, + new + { + timestamp = "2017-01-02T02:35:00Z", + value = 3231536, + }, + new + { + timestamp = "2017-01-02T02:40:00Z", + value = 3230723, + }, + new + { + timestamp = "2017-01-02T02:45:00Z", + value = 3230727, + }, + new + { + timestamp = "2017-01-02T02:50:00Z", + value = 3230727, + }, + new + { + timestamp = "2017-01-02T02:55:00Z", + value = 3230727, + }, + new + { + timestamp = "2017-01-02T03:00:00Z", + value = 3231880, + }, + new + { + timestamp = "2017-01-02T03:05:00Z", + value = 3232283, + }, + new + { + timestamp = "2017-01-02T03:10:00Z", + value = 3232283, + }, + new + { + timestamp = "2017-01-02T03:15:00Z", + value = 3232283, + }, + new + { + timestamp = "2017-01-02T03:20:00Z", + value = 3232325, + }, + new + { + timestamp = "2017-01-02T03:25:00Z", + value = 3232323, + }, + new + { + timestamp = "2017-01-02T03:30:00Z", + value = 3232327, + }, + new + { + timestamp = "2017-01-02T03:35:00Z", + value = 3232340, + }, + new + { + timestamp = "2017-01-02T03:40:00Z", + value = 3232713, + }, + new + { + timestamp = "2017-01-02T03:45:00Z", + value = 3232729, + }, + new + { + timestamp = "2017-01-02T03:50:00Z", + value = 3232756, + }, + new + { + timestamp = "2017-01-02T03:55:00Z", + value = 3233500, + }, + new + { + timestamp = "2017-01-02T04:00:00Z", + value = 3233500, + }, + new + { + timestamp = "2017-01-02T04:05:00Z", + value = 3233500, + } + }, + granularity = "minutely", + customInterval = 5, + stableTrendWindow = 10, + threshold = 0.99, + period = 0, +}); +Response response = await client.DetectUnivariateChangePointAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> + + + +This sample shows how to call DetectUnivariateChangePoint and parse the result. +"); +AzureKeyCredential credential = new AzureKeyCredential(""); +Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); + +using RequestContent content = RequestContent.Create(new +{ + series = new object[] + { + new + { + timestamp = "2017-01-01T06:45:00Z", + value = 1639196, + }, + new + { + timestamp = "2017-01-01T06:50:00Z", + value = 1639290, + }, + new + { + timestamp = "2017-01-01T06:55:00Z", + value = 1667293, + }, + new + { + timestamp = "2017-01-01T07:00:00Z", + value = 1703130, + }, + new + { + timestamp = "2017-01-01T07:05:00Z", + value = 1650912, + }, + new + { + timestamp = "2017-01-01T07:10:00Z", + value = 1653596, + }, + new + { + timestamp = "2017-01-01T07:15:00Z", + value = 1653793, + }, + new + { + timestamp = "2017-01-01T07:20:00Z", + value = 1653795, + }, + new + { + timestamp = "2017-01-01T07:25:00Z", + value = 1663471, + }, + new + { + timestamp = "2017-01-01T07:30:00Z", + value = 1662358, + }, + new + { + timestamp = "2017-01-01T07:35:00Z", + value = 1664320, + }, + new + { + timestamp = "2017-01-01T07:40:00Z", + value = 1664942, + }, + new + { + timestamp = "2017-01-01T07:45:00Z", + value = 1664966, + }, + new + { + timestamp = "2017-01-01T07:50:00Z", + value = 1724271, + }, + new + { + timestamp = "2017-01-01T07:55:00Z", + value = 1678720, + }, + new + { + timestamp = "2017-01-01T08:00:00Z", + value = 1672536, + }, + new + { + timestamp = "2017-01-01T08:05:00Z", + value = 1672544, + }, + new + { + timestamp = "2017-01-01T08:10:00Z", + value = 1672364, + }, + new + { + timestamp = "2017-01-01T08:15:00Z", + value = 1672912, + }, + new + { + timestamp = "2017-01-01T08:20:00Z", + value = 1672736, + }, + new + { + timestamp = "2017-01-01T08:25:00Z", + value = 1672725, + }, + new + { + timestamp = "2017-01-01T08:30:00Z", + value = 1673247, + }, + new + { + timestamp = "2017-01-01T08:35:00Z", + value = 1673109, + }, + new + { + timestamp = "2017-01-01T08:40:00Z", + value = 1690088, + }, + new + { + timestamp = "2017-01-01T08:45:00Z", + value = 1703865, + }, + new + { + timestamp = "2017-01-01T08:50:00Z", + value = 1703865, + }, + new + { + timestamp = "2017-01-01T08:55:00Z", + value = 1786581, + }, + new + { + timestamp = "2017-01-01T09:00:00Z", + value = 1800945, + }, + new + { + timestamp = "2017-01-01T09:05:00Z", + value = 1800957, + }, + new + { + timestamp = "2017-01-01T09:10:00Z", + value = 1801191, + }, + new + { + timestamp = "2017-01-01T09:15:00Z", + value = 1801412, + }, + new + { + timestamp = "2017-01-01T09:20:00Z", + value = 1801621, + }, + new + { + timestamp = "2017-01-01T09:25:00Z", + value = 1801621, + }, + new + { + timestamp = "2017-01-01T09:30:00Z", + value = 1801654, + }, + new + { + timestamp = "2017-01-01T09:35:00Z", + value = 1802105, + }, + new + { + timestamp = "2017-01-01T09:40:00Z", + value = 1801800, + }, + new + { + timestamp = "2017-01-01T09:45:00Z", + value = 1803040, + }, + new + { + timestamp = "2017-01-01T09:50:00Z", + value = 1803672, + }, + new + { + timestamp = "2017-01-01T09:55:00Z", + value = 1803535, + }, + new + { + timestamp = "2017-01-01T10:00:00Z", + value = 1803541, + }, + new + { + timestamp = "2017-01-01T10:05:00Z", + value = 1803545, + }, + new + { + timestamp = "2017-01-01T10:10:00Z", + value = 1803599, + }, + new + { + timestamp = "2017-01-01T10:15:00Z", + value = 1803616, + }, + new + { + timestamp = "2017-01-01T10:20:00Z", + value = 1803619, + }, + new + { + timestamp = "2017-01-01T10:25:00Z", + value = 1809942, + }, + new + { + timestamp = "2017-01-01T10:30:00Z", + value = 1802720, + }, + new + { + timestamp = "2017-01-01T10:35:00Z", + value = 1802720, + }, + new + { + timestamp = "2017-01-01T10:40:00Z", + value = 1802888, + }, + new + { + timestamp = "2017-01-01T10:45:00Z", + value = 1809574, + }, + new + { + timestamp = "2017-01-01T10:50:00Z", + value = 1803896, + }, + new + { + timestamp = "2017-01-01T10:55:00Z", + value = 1803850, + }, + new + { + timestamp = "2017-01-01T11:00:00Z", + value = 1803854, + }, + new + { + timestamp = "2017-01-01T11:05:00Z", + value = 1803854, + }, + new + { + timestamp = "2017-01-01T11:10:00Z", + value = 1803797, + }, + new + { + timestamp = "2017-01-01T11:15:00Z", + value = 1803921, + }, + new + { + timestamp = "2017-01-01T11:20:00Z", + value = 1803933, + }, + new + { + timestamp = "2017-01-01T11:25:00Z", + value = 1804040, + }, + new + { + timestamp = "2017-01-01T11:30:00Z", + value = 1804044, + }, + new + { + timestamp = "2017-01-01T11:35:00Z", + value = 1804070, + }, + new + { + timestamp = "2017-01-01T11:40:00Z", + value = 1804070, + }, + new + { + timestamp = "2017-01-01T11:45:00Z", + value = 1804068, + }, + new + { + timestamp = "2017-01-01T11:50:00Z", + value = 1804073, + }, + new + { + timestamp = "2017-01-01T11:55:00Z", + value = 1804101, + }, + new + { + timestamp = "2017-01-01T12:00:00Z", + value = 1804674, + }, + new + { + timestamp = "2017-01-01T12:05:00Z", + value = 1804714, + }, + new + { + timestamp = "2017-01-01T12:10:00Z", + value = 1804730, + }, + new + { + timestamp = "2017-01-01T12:15:00Z", + value = 1804816, + }, + new + { + timestamp = "2017-01-01T12:20:00Z", + value = 1803996, + }, + new + { + timestamp = "2017-01-01T12:25:00Z", + value = 1803998, + }, + new + { + timestamp = "2017-01-01T12:30:00Z", + value = 1804015, + }, + new + { + timestamp = "2017-01-01T12:35:00Z", + value = 1804047, + }, + new + { + timestamp = "2017-01-01T12:40:00Z", + value = 1804050, + }, + new + { + timestamp = "2017-01-01T12:45:00Z", + value = 1804218, + }, + new + { + timestamp = "2017-01-01T12:50:00Z", + value = 1804217, + }, + new + { + timestamp = "2017-01-01T12:55:00Z", + value = 1804217, + }, + new + { + timestamp = "2017-01-01T13:00:00Z", + value = 1804205, + }, + new + { + timestamp = "2017-01-01T13:05:00Z", + value = 1804728, + }, + new + { + timestamp = "2017-01-01T13:10:00Z", + value = 1804748, + }, + new + { + timestamp = "2017-01-01T13:15:00Z", + value = 1805232, + }, + new + { + timestamp = "2017-01-01T13:20:00Z", + value = 1814121, + }, + new + { + timestamp = "2017-01-01T13:25:00Z", + value = 1806789, + }, + new + { + timestamp = "2017-01-01T13:30:00Z", + value = 1806119, + }, + new + { + timestamp = "2017-01-01T13:35:00Z", + value = 1806329, + }, + new + { + timestamp = "2017-01-01T13:40:00Z", + value = 1806454, + }, + new + { + timestamp = "2017-01-01T13:45:00Z", + value = 1806852, + }, + new + { + timestamp = "2017-01-01T13:50:00Z", + value = 1807347, + }, + new + { + timestamp = "2017-01-01T13:55:00Z", + value = 1812144, + }, + new + { + timestamp = "2017-01-01T14:00:00Z", + value = 1807418, + }, + new + { + timestamp = "2017-01-01T14:05:00Z", + value = 1807418, + }, + new + { + timestamp = "2017-01-01T14:10:00Z", + value = 1807432, + }, + new + { + timestamp = "2017-01-01T14:15:00Z", + value = 1808540, + }, + new + { + timestamp = "2017-01-01T14:20:00Z", + value = 1808541, + }, + new + { + timestamp = "2017-01-01T14:25:00Z", + value = 1807831, + }, + new + { + timestamp = "2017-01-01T14:30:00Z", + value = 1807852, + }, + new + { + timestamp = "2017-01-01T14:35:00Z", + value = 1807811, + }, + new + { + timestamp = "2017-01-01T14:40:00Z", + value = 2214285, + }, + new + { + timestamp = "2017-01-01T14:45:00Z", + value = 2215019, + }, + new + { + timestamp = "2017-01-01T14:50:00Z", + value = 2215329, + }, + new + { + timestamp = "2017-01-01T14:55:00Z", + value = 2215097, + }, + new + { + timestamp = "2017-01-01T15:00:00Z", + value = 2215129, + }, + new + { + timestamp = "2017-01-01T15:05:00Z", + value = 2215120, + }, + new + { + timestamp = "2017-01-01T15:10:00Z", + value = 2217056, + }, + new + { + timestamp = "2017-01-01T15:15:00Z", + value = 2217056, + }, + new + { + timestamp = "2017-01-01T15:20:00Z", + value = 2222126, + }, + new + { + timestamp = "2017-01-01T15:25:00Z", + value = 2226472, + }, + new + { + timestamp = "2017-01-01T15:30:00Z", + value = 2226722, + }, + new + { + timestamp = "2017-01-01T15:35:00Z", + value = 2226729, + }, + new + { + timestamp = "2017-01-01T15:40:00Z", + value = 2226735, + }, + new + { + timestamp = "2017-01-01T15:45:00Z", + value = 2226735, + }, + new + { + timestamp = "2017-01-01T15:50:00Z", + value = 2226735, + }, + new + { + timestamp = "2017-01-01T15:55:00Z", + value = 2226952, + }, + new + { + timestamp = "2017-01-01T16:00:00Z", + value = 2226962, + }, + new + { + timestamp = "2017-01-01T16:05:00Z", + value = 2649337, + }, + new + { + timestamp = "2017-01-01T16:10:00Z", + value = 2092796, + }, + new + { + timestamp = "2017-01-01T16:15:00Z", + value = 2092839, + }, + new + { + timestamp = "2017-01-01T16:20:00Z", + value = 2092940, + }, + new + { + timestamp = "2017-01-01T16:25:00Z", + value = 2092940, + }, + new + { + timestamp = "2017-01-01T16:30:00Z", + value = 2092965, + }, + new + { + timestamp = "2017-01-01T16:35:00Z", + value = 2092979, + }, + new + { + timestamp = "2017-01-01T16:40:00Z", + value = 2095588, + }, + new + { + timestamp = "2017-01-01T16:45:00Z", + value = 2099586, + }, + new + { + timestamp = "2017-01-01T16:50:00Z", + value = 2102981, + }, + new + { + timestamp = "2017-01-01T16:55:00Z", + value = 2108053, + }, + new + { + timestamp = "2017-01-01T17:00:00Z", + value = 2107907, + }, + new + { + timestamp = "2017-01-01T17:05:00Z", + value = 2108241, + }, + new + { + timestamp = "2017-01-01T17:10:00Z", + value = 2100321, + }, + new + { + timestamp = "2017-01-01T17:15:00Z", + value = 2100448, + }, + new + { + timestamp = "2017-01-01T17:20:00Z", + value = 2100483, + }, + new + { + timestamp = "2017-01-01T17:25:00Z", + value = 2103042, + }, + new + { + timestamp = "2017-01-01T17:30:00Z", + value = 2103037, + }, + new + { + timestamp = "2017-01-01T17:35:00Z", + value = 2103040, + }, + new + { + timestamp = "2017-01-01T17:40:00Z", + value = 2103054, + }, + new + { + timestamp = "2017-01-01T17:45:00Z", + value = 2103058, + }, + new + { + timestamp = "2017-01-01T17:50:00Z", + value = 1830757, + }, + new + { + timestamp = "2017-01-01T17:55:00Z", + value = 1830855, + }, + new + { + timestamp = "2017-01-01T18:00:00Z", + value = 1831495, + }, + new + { + timestamp = "2017-01-01T18:05:00Z", + value = 1831463, + }, + new + { + timestamp = "2017-01-01T18:10:00Z", + value = 1831963, + }, + new + { + timestamp = "2017-01-01T18:15:00Z", + value = 1832046, + }, + new + { + timestamp = "2017-01-01T18:20:00Z", + value = 1832070, + }, + new + { + timestamp = "2017-01-01T18:25:00Z", + value = 1835511, + }, + new + { + timestamp = "2017-01-01T18:30:00Z", + value = 1835265, + }, + new + { + timestamp = "2017-01-01T18:35:00Z", + value = 1835481, + }, + new + { + timestamp = "2017-01-01T18:40:00Z", + value = 1835578, + }, + new + { + timestamp = "2017-01-01T18:45:00Z", + value = 1835611, + }, + new + { + timestamp = "2017-01-01T18:50:00Z", + value = 1836314, + }, + new + { + timestamp = "2017-01-01T18:55:00Z", + value = 1836369, + }, + new + { + timestamp = "2017-01-01T19:00:00Z", + value = 1837280, + }, + new + { + timestamp = "2017-01-01T19:05:00Z", + value = 1842939, + }, + new + { + timestamp = "2017-01-01T19:10:00Z", + value = 1843126, + }, + new + { + timestamp = "2017-01-01T19:15:00Z", + value = 1845840, + }, + new + { + timestamp = "2017-01-01T19:20:00Z", + value = 1842444, + }, + new + { + timestamp = "2017-01-01T19:25:00Z", + value = 1839891, + }, + new + { + timestamp = "2017-01-01T19:30:00Z", + value = 1839875, + }, + new + { + timestamp = "2017-01-01T19:35:00Z", + value = 1839870, + }, + new + { + timestamp = "2017-01-01T19:40:00Z", + value = 1840090, + }, + new + { + timestamp = "2017-01-01T19:45:00Z", + value = 1840479, + }, + new + { + timestamp = "2017-01-01T19:50:00Z", + value = 1840479, + }, + new + { + timestamp = "2017-01-01T19:55:00Z", + value = 1840482, + }, + new + { + timestamp = "2017-01-01T20:00:00Z", + value = 1841522, + }, + new + { + timestamp = "2017-01-01T20:05:00Z", + value = 1841836, + }, + new + { + timestamp = "2017-01-01T20:10:00Z", + value = 1842377, + }, + new + { + timestamp = "2017-01-01T20:15:00Z", + value = 1842388, + }, + new + { + timestamp = "2017-01-01T20:20:00Z", + value = 1842489, + }, + new + { + timestamp = "2017-01-01T20:25:00Z", + value = 1842489, + }, + new + { + timestamp = "2017-01-01T20:30:00Z", + value = 1842489, + }, + new + { + timestamp = "2017-01-01T20:35:00Z", + value = 1842496, + }, + new + { + timestamp = "2017-01-01T20:40:00Z", + value = 1842689, + }, + new + { + timestamp = "2017-01-01T20:45:00Z", + value = 1843117, + }, + new + { + timestamp = "2017-01-01T20:50:00Z", + value = 1843116, + }, + new + { + timestamp = "2017-01-01T20:55:00Z", + value = 1843227, + }, + new + { + timestamp = "2017-01-01T21:00:00Z", + value = 1843138, + }, + new + { + timestamp = "2017-01-01T21:05:00Z", + value = 1843141, + }, + new + { + timestamp = "2017-01-01T21:10:00Z", + value = 1843310, + }, + new + { + timestamp = "2017-01-01T21:15:00Z", + value = 1843310, + }, + new + { + timestamp = "2017-01-01T21:20:00Z", + value = 1843507, + }, + new + { + timestamp = "2017-01-01T21:25:00Z", + value = 1843953, + }, + new + { + timestamp = "2017-01-01T21:30:00Z", + value = 1844778, + }, + new + { + timestamp = "2017-01-01T21:35:00Z", + value = 1843918, + }, + new + { + timestamp = "2017-01-01T21:40:00Z", + value = 1882692, + }, + new + { + timestamp = "2017-01-01T21:45:00Z", + value = 1974888, + }, + new + { + timestamp = "2017-01-01T21:50:00Z", + value = 2157136, + }, + new + { + timestamp = "2017-01-01T21:55:00Z", + value = 2154987, + }, + new + { + timestamp = "2017-01-01T22:00:00Z", + value = 2155664, + }, + new + { + timestamp = "2017-01-01T22:05:00Z", + value = 2155660, + }, + new + { + timestamp = "2017-01-01T22:10:00Z", + value = 2155824, + }, + new + { + timestamp = "2017-01-01T22:15:00Z", + value = 2155824, + }, + new + { + timestamp = "2017-01-01T22:20:00Z", + value = 2156329, + }, + new + { + timestamp = "2017-01-01T22:25:00Z", + value = 2156479, + }, + new + { + timestamp = "2017-01-01T22:30:00Z", + value = 2165269, + }, + new + { + timestamp = "2017-01-01T22:35:00Z", + value = 2165433, + }, + new + { + timestamp = "2017-01-01T22:40:00Z", + value = 2165739, + }, + new + { + timestamp = "2017-01-01T22:45:00Z", + value = 2165931, + }, + new + { + timestamp = "2017-01-01T22:50:00Z", + value = 2165928, + }, + new + { + timestamp = "2017-01-01T22:55:00Z", + value = 2165989, + }, + new + { + timestamp = "2017-01-01T23:00:00Z", + value = 2228961, + }, + new + { + timestamp = "2017-01-01T23:05:00Z", + value = 2228961, + }, + new + { + timestamp = "2017-01-01T23:10:00Z", + value = 2228961, + }, + new + { + timestamp = "2017-01-01T23:15:00Z", + value = 2485802, + }, + new + { + timestamp = "2017-01-01T23:20:00Z", + value = 2485802, + }, + new + { + timestamp = "2017-01-01T23:25:00Z", + value = 2486021, + }, + new + { + timestamp = "2017-01-01T23:30:00Z", + value = 2485293, + }, + new + { + timestamp = "2017-01-01T23:35:00Z", + value = 2485293, + }, + new + { + timestamp = "2017-01-01T23:40:00Z", + value = 2485324, + }, + new + { + timestamp = "2017-01-01T23:45:00Z", + value = 2489142, + }, + new + { + timestamp = "2017-01-01T23:50:00Z", + value = 2526312, + }, + new + { + timestamp = "2017-01-01T23:55:00Z", + value = 2526313, + }, + new + { + timestamp = "2017-01-02T00:00:00Z", + value = 2526314, + }, + new + { + timestamp = "2017-01-02T00:05:00Z", + value = 2526324, + }, + new + { + timestamp = "2017-01-02T00:10:00Z", + value = 2526325, + }, + new + { + timestamp = "2017-01-02T00:15:00Z", + value = 2526205, + }, + new + { + timestamp = "2017-01-02T00:20:00Z", + value = 2526226, + }, + new + { + timestamp = "2017-01-02T00:25:00Z", + value = 2526475, + }, + new + { + timestamp = "2017-01-02T00:30:00Z", + value = 2526471, + }, + new + { + timestamp = "2017-01-02T00:35:00Z", + value = 2526471, + }, + new + { + timestamp = "2017-01-02T00:40:00Z", + value = 2526534, + }, + new + { + timestamp = "2017-01-02T00:45:00Z", + value = 2526646, + }, + new + { + timestamp = "2017-01-02T00:50:00Z", + value = 2526646, + }, + new + { + timestamp = "2017-01-02T00:55:00Z", + value = 2526648, + }, + new + { + timestamp = "2017-01-02T01:00:00Z", + value = 2526658, + }, + new + { + timestamp = "2017-01-02T01:05:00Z", + value = 2526771, + }, + new + { + timestamp = "2017-01-02T01:10:00Z", + value = 2526773, + }, + new + { + timestamp = "2017-01-02T01:15:00Z", + value = 2526793, + }, + new + { + timestamp = "2017-01-02T01:20:00Z", + value = 2527010, + }, + new + { + timestamp = "2017-01-02T01:25:00Z", + value = 2527031, + }, + new + { + timestamp = "2017-01-02T01:30:00Z", + value = 3178096, + }, + new + { + timestamp = "2017-01-02T01:35:00Z", + value = 3196305, + }, + new + { + timestamp = "2017-01-02T01:40:00Z", + value = 3196202, + }, + new + { + timestamp = "2017-01-02T01:45:00Z", + value = 3196202, + }, + new + { + timestamp = "2017-01-02T01:50:00Z", + value = 3196205, + }, + new + { + timestamp = "2017-01-02T01:55:00Z", + value = 3229232, + }, + new + { + timestamp = "2017-01-02T02:00:00Z", + value = 3230463, + }, + new + { + timestamp = "2017-01-02T02:05:00Z", + value = 3230468, + }, + new + { + timestamp = "2017-01-02T02:10:00Z", + value = 3230468, + }, + new + { + timestamp = "2017-01-02T02:15:00Z", + value = 3230468, + }, + new + { + timestamp = "2017-01-02T02:20:00Z", + value = 3230470, + }, + new + { + timestamp = "2017-01-02T02:25:00Z", + value = 3230467, + }, + new + { + timestamp = "2017-01-02T02:30:00Z", + value = 3230506, + }, + new + { + timestamp = "2017-01-02T02:35:00Z", + value = 3231536, + }, + new + { + timestamp = "2017-01-02T02:40:00Z", + value = 3230723, + }, + new + { + timestamp = "2017-01-02T02:45:00Z", + value = 3230727, + }, + new + { + timestamp = "2017-01-02T02:50:00Z", + value = 3230727, + }, + new + { + timestamp = "2017-01-02T02:55:00Z", + value = 3230727, + }, + new + { + timestamp = "2017-01-02T03:00:00Z", + value = 3231880, + }, + new + { + timestamp = "2017-01-02T03:05:00Z", + value = 3232283, + }, + new + { + timestamp = "2017-01-02T03:10:00Z", + value = 3232283, + }, + new + { + timestamp = "2017-01-02T03:15:00Z", + value = 3232283, + }, + new + { + timestamp = "2017-01-02T03:20:00Z", + value = 3232325, + }, + new + { + timestamp = "2017-01-02T03:25:00Z", + value = 3232323, + }, + new + { + timestamp = "2017-01-02T03:30:00Z", + value = 3232327, + }, + new + { + timestamp = "2017-01-02T03:35:00Z", + value = 3232340, + }, + new + { + timestamp = "2017-01-02T03:40:00Z", + value = 3232713, + }, + new + { + timestamp = "2017-01-02T03:45:00Z", + value = 3232729, + }, + new + { + timestamp = "2017-01-02T03:50:00Z", + value = 3232756, + }, + new + { + timestamp = "2017-01-02T03:55:00Z", + value = 3233500, + }, + new + { + timestamp = "2017-01-02T04:00:00Z", + value = 3233500, + }, + new + { + timestamp = "2017-01-02T04:05:00Z", + value = 3233500, + } + }, + granularity = "minutely", + customInterval = 5, + stableTrendWindow = 10, + threshold = 0.99, + period = 0, +}); +Response response = client.DetectUnivariateChangePoint(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); ]]> diff --git a/samples/AnomalyDetector/tests/Generated/Samples/Samples_Multivariate.cs b/samples/AnomalyDetector/tests/Generated/Samples/Samples_Multivariate.cs index e4647fa5ca2..e85583b23e6 100644 --- a/samples/AnomalyDetector/tests/Generated/Samples/Samples_Multivariate.cs +++ b/samples/AnomalyDetector/tests/Generated/Samples/Samples_Multivariate.cs @@ -20,13 +20,13 @@ public partial class Samples_Multivariate { [Test] [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_GetMultivariateBatchDetectionResult_ShortVersion() + public void Example_Multivariate_GetMultivariateBatchDetectionResult_GetMultivariateBatchDetectionResult() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - Response response = client.GetMultivariateBatchDetectionResult(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); + Response response = client.GetMultivariateBatchDetectionResult(Guid.Parse("663884e6-b117-11ea-b3de-0242ac130004"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resultId").ToString()); @@ -40,13 +40,13 @@ public void Example_Multivariate_GetMultivariateBatchDetectionResult_ShortVersio [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_GetMultivariateBatchDetectionResult_ShortVersion_Async() + public async Task Example_Multivariate_GetMultivariateBatchDetectionResult_GetMultivariateBatchDetectionResult_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); + Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.Parse("663884e6-b117-11ea-b3de-0242ac130004"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resultId").ToString()); @@ -60,242 +60,48 @@ public async Task Example_Multivariate_GetMultivariateBatchDetectionResult_Short [Test] [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_GetMultivariateBatchDetectionResult_ShortVersion_Convenience() + public void Example_Multivariate_GetMultivariateBatchDetectionResult_GetMultivariateBatchDetectionResult_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - Response response = client.GetMultivariateBatchDetectionResult(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + Response response = client.GetMultivariateBatchDetectionResult(Guid.Parse("663884e6-b117-11ea-b3de-0242ac130004")); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_GetMultivariateBatchDetectionResult_ShortVersion_Convenience_Async() + public async Task Example_Multivariate_GetMultivariateBatchDetectionResult_GetMultivariateBatchDetectionResult_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.Parse("663884e6-b117-11ea-b3de-0242ac130004")); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_GetMultivariateBatchDetectionResult_AllParameters() + public void Example_Multivariate_TrainMultivariateModel_CreateAndTrainMultivariateModel() { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - - Response response = client.GetMultivariateBatchDetectionResult(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("resultId").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("errors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("errors")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("variable").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("dataSource").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("topContributorCount").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("timestamp").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("isAnomaly").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("severity").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("score").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("variable").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("contributionScore").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("correlationChanges").GetProperty("changedVariables")[0].ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("message").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_GetMultivariateBatchDetectionResult_AllParameters_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - - Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("resultId").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("errors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("errors")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("variable").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("dataSource").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("topContributorCount").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("timestamp").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("isAnomaly").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("severity").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("score").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("variable").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("contributionScore").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("correlationChanges").GetProperty("changedVariables")[0].ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("message").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_GetMultivariateBatchDetectionResult_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - - Response response = client.GetMultivariateBatchDetectionResult(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_GetMultivariateBatchDetectionResult_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - - Response response = await client.GetMultivariateBatchDetectionResultAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_TrainMultivariateModel_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - - using RequestContent content = RequestContent.Create(new - { - dataSource = "", - startTime = "2022-05-10T18:57:31.2311892Z", - endTime = "2022-05-10T18:57:31.2311892Z", - }); - Response response = client.TrainMultivariateModel(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_TrainMultivariateModel_ShortVersion_Async() - { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); using RequestContent content = RequestContent.Create(new { - dataSource = "", - startTime = "2022-05-10T18:57:31.2311892Z", - endTime = "2022-05-10T18:57:31.2311892Z", - }); - Response response = await client.TrainMultivariateModelAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_TrainMultivariateModel_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - - ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - Response response = client.TrainMultivariateModel(modelInfo); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_TrainMultivariateModel_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - - ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - Response response = await client.TrainMultivariateModelAsync(modelInfo); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_TrainMultivariateModel_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - - using RequestContent content = RequestContent.Create(new - { - dataSource = "", - dataSchema = "OneTable", - startTime = "2022-05-10T18:57:31.2311892Z", - endTime = "2022-05-10T18:57:31.2311892Z", - displayName = "", - slidingWindow = 1234, + slidingWindow = 20, alignPolicy = new { - alignMode = "Inner", - fillNAMethod = "Previous", - paddingValue = 123.45F, - }, - status = "CREATED", - diagnosticsInfo = new - { - modelState = new - { - epochIds = new object[] - { -1234 - }, - trainLosses = new object[] - { -123.45F - }, - validationLosses = new object[] - { -123.45F - }, - latenciesInSeconds = new object[] - { -123.45F - }, - }, - variableStates = new object[] - { -new -{ -variable = "", -filledNARatio = 123.45F, -effectiveCount = 1234, -firstTimestamp = "2022-05-10T18:57:31.2311892Z", -lastTimestamp = "2022-05-10T18:57:31.2311892Z", -} - }, + alignMode = "Outer", + fillNAMethod = "Linear", + paddingValue = 0, }, + dataSource = "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", + dataSchema = "OneTable", + startTime = "2019-04-01T00:00:00Z", + endTime = "2019-04-02T00:00:00Z", + displayName = "Devops-MultiAD", }); Response response = client.TrainMultivariateModel(content); @@ -303,85 +109,30 @@ public void Example_Multivariate_TrainMultivariateModel_AllParameters() Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("createdTime").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSource").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSchema").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("slidingWindow").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("alignMode").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("fillNAMethod").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("paddingValue").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("epochIds")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("trainLosses")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("validationLosses")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("latenciesInSeconds")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("variable").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_TrainMultivariateModel_AllParameters_Async() + public async Task Example_Multivariate_TrainMultivariateModel_CreateAndTrainMultivariateModel_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); using RequestContent content = RequestContent.Create(new { - dataSource = "", - dataSchema = "OneTable", - startTime = "2022-05-10T18:57:31.2311892Z", - endTime = "2022-05-10T18:57:31.2311892Z", - displayName = "", - slidingWindow = 1234, + slidingWindow = 20, alignPolicy = new { - alignMode = "Inner", - fillNAMethod = "Previous", - paddingValue = 123.45F, - }, - status = "CREATED", - diagnosticsInfo = new - { - modelState = new - { - epochIds = new object[] - { -1234 - }, - trainLosses = new object[] - { -123.45F - }, - validationLosses = new object[] - { -123.45F - }, - latenciesInSeconds = new object[] - { -123.45F - }, - }, - variableStates = new object[] - { -new -{ -variable = "", -filledNARatio = 123.45F, -effectiveCount = 1234, -firstTimestamp = "2022-05-10T18:57:31.2311892Z", -lastTimestamp = "2022-05-10T18:57:31.2311892Z", -} - }, + alignMode = "Outer", + fillNAMethod = "Linear", + paddingValue = 0, }, + dataSource = "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", + dataSchema = "OneTable", + startTime = "2019-04-01T00:00:00Z", + endTime = "2019-04-02T00:00:00Z", + displayName = "Devops-MultiAD", }); Response response = await client.TrainMultivariateModelAsync(content); @@ -389,66 +140,26 @@ public async Task Example_Multivariate_TrainMultivariateModel_AllParameters_Asyn Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("createdTime").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSource").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSchema").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("slidingWindow").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("alignMode").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("fillNAMethod").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("paddingValue").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("epochIds")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("trainLosses")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("validationLosses")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("latenciesInSeconds")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("variable").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_TrainMultivariateModel_AllParameters_Convenience() + public void Example_Multivariate_TrainMultivariateModel_CreateAndTrainMultivariateModel_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")) + ModelInfo modelInfo = new ModelInfo("https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", DateTimeOffset.Parse("2019-04-01T00:00:00Z"), DateTimeOffset.Parse("2019-04-02T00:00:00Z")) { DataSchema = DataSchema.OneTable, - DisplayName = "", - SlidingWindow = 1234, + DisplayName = "Devops-MultiAD", + SlidingWindow = 20, AlignPolicy = new AlignPolicy { - AlignMode = AlignMode.Inner, - FillNAMethod = FillNAMethod.Previous, - PaddingValue = 123.45F, - }, - Status = ModelStatus.Created, - DiagnosticsInfo = new DiagnosticsInfo - { - ModelState = new ModelState - { - EpochIds = { 1234 }, - TrainLosses = { 123.45F }, - ValidationLosses = { 123.45F }, - LatenciesInSeconds = { 123.45F }, - }, - VariableStates = {new VariableState -{ -Variable = "", -FilledNARatio = 123.45F, -EffectiveCount = 1234, -FirstTimestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), -LastTimestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), -}}, + AlignMode = AlignMode.Outer, + FillNAMethod = FillNAMethod.Linear, + PaddingValue = 0, }, }; Response response = client.TrainMultivariateModel(modelInfo); @@ -456,41 +167,22 @@ public void Example_Multivariate_TrainMultivariateModel_AllParameters_Convenienc [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_TrainMultivariateModel_AllParameters_Convenience_Async() + public async Task Example_Multivariate_TrainMultivariateModel_CreateAndTrainMultivariateModel_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - ModelInfo modelInfo = new ModelInfo("", DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")) + ModelInfo modelInfo = new ModelInfo("https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", DateTimeOffset.Parse("2019-04-01T00:00:00Z"), DateTimeOffset.Parse("2019-04-02T00:00:00Z")) { DataSchema = DataSchema.OneTable, - DisplayName = "", - SlidingWindow = 1234, + DisplayName = "Devops-MultiAD", + SlidingWindow = 20, AlignPolicy = new AlignPolicy { - AlignMode = AlignMode.Inner, - FillNAMethod = FillNAMethod.Previous, - PaddingValue = 123.45F, - }, - Status = ModelStatus.Created, - DiagnosticsInfo = new DiagnosticsInfo - { - ModelState = new ModelState - { - EpochIds = { 1234 }, - TrainLosses = { 123.45F }, - ValidationLosses = { 123.45F }, - LatenciesInSeconds = { 123.45F }, - }, - VariableStates = {new VariableState -{ -Variable = "", -FilledNARatio = 123.45F, -EffectiveCount = 1234, -FirstTimestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), -LastTimestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), -}}, + AlignMode = AlignMode.Outer, + FillNAMethod = FillNAMethod.Linear, + PaddingValue = 0, }, }; Response response = await client.TrainMultivariateModelAsync(modelInfo); @@ -498,222 +190,100 @@ public async Task Example_Multivariate_TrainMultivariateModel_AllParameters_Conv [Test] [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_DeleteMultivariateModel_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - - Response response = client.DeleteMultivariateModel(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_DeleteMultivariateModel_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - - Response response = await client.DeleteMultivariateModelAsync(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_DeleteMultivariateModel_AllParameters() + public void Example_Multivariate_DeleteMultivariateModel_DeleteMultivariateModel() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - Response response = client.DeleteMultivariateModel(""); + Response response = client.DeleteMultivariateModel("45aad126-aafd-11ea-b8fb-d89ef3400c5f"); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_DeleteMultivariateModel_AllParameters_Async() + public async Task Example_Multivariate_DeleteMultivariateModel_DeleteMultivariateModel_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - Response response = await client.DeleteMultivariateModelAsync(""); + Response response = await client.DeleteMultivariateModelAsync("45aad126-aafd-11ea-b8fb-d89ef3400c5f"); Console.WriteLine(response.Status); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_GetMultivariateModel_ShortVersion() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - - Response response = client.GetMultivariateModel("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_GetMultivariateModel_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - - Response response = await client.GetMultivariateModelAsync("", null); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_GetMultivariateModel_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - - Response response = client.GetMultivariateModel(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_GetMultivariateModel_ShortVersion_Convenience_Async() + public void Example_Multivariate_GetMultivariateModel_GetAMultivariateModel() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - Response response = await client.GetMultivariateModelAsync(""); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_GetMultivariateModel_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - - Response response = client.GetMultivariateModel("", null); + Response response = client.GetMultivariateModel("45aad126-aafd-11ea-b8fb-d89ef3400c5f", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("createdTime").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSource").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSchema").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("slidingWindow").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("alignMode").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("fillNAMethod").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("paddingValue").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("epochIds")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("trainLosses")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("validationLosses")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("latenciesInSeconds")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("variable").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_GetMultivariateModel_AllParameters_Async() + public async Task Example_Multivariate_GetMultivariateModel_GetAMultivariateModel_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - Response response = await client.GetMultivariateModelAsync("", null); + Response response = await client.GetMultivariateModelAsync("45aad126-aafd-11ea-b8fb-d89ef3400c5f", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); Console.WriteLine(result.GetProperty("createdTime").ToString()); Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSource").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSchema").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("slidingWindow").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("alignMode").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("fillNAMethod").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("paddingValue").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("epochIds")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("trainLosses")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("validationLosses")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("latenciesInSeconds")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("variable").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_GetMultivariateModel_AllParameters_Convenience() + public void Example_Multivariate_GetMultivariateModel_GetAMultivariateModel_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - Response response = client.GetMultivariateModel(""); + Response response = client.GetMultivariateModel("45aad126-aafd-11ea-b8fb-d89ef3400c5f"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_GetMultivariateModel_AllParameters_Convenience_Async() + public async Task Example_Multivariate_GetMultivariateModel_GetAMultivariateModel_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - Response response = await client.GetMultivariateModelAsync(""); + Response response = await client.GetMultivariateModelAsync("45aad126-aafd-11ea-b8fb-d89ef3400c5f"); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_DetectMultivariateBatchAnomaly_ShortVersion() + public void Example_Multivariate_DetectMultivariateBatchAnomaly_DetectMultivariateBatchAnomaly() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); using RequestContent content = RequestContent.Create(new { - dataSource = "http://localhost:3000", - topContributorCount = 1234, - startTime = "2022-05-10T18:57:31.2311892Z", - endTime = "2022-05-10T18:57:31.2311892Z", + dataSource = "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", + topContributorCount = 10, + startTime = "2019-04-01T00:15:00Z", + endTime = "2019-04-01T00:40:00Z", }); - Response response = client.DetectMultivariateBatchAnomaly("", content); + Response response = client.DetectMultivariateBatchAnomaly("45aad126-aafd-11ea-b8fb-d89ef3400c5f", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resultId").ToString()); @@ -727,20 +297,20 @@ public void Example_Multivariate_DetectMultivariateBatchAnomaly_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_DetectMultivariateBatchAnomaly_ShortVersion_Async() + public async Task Example_Multivariate_DetectMultivariateBatchAnomaly_DetectMultivariateBatchAnomaly_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); using RequestContent content = RequestContent.Create(new { - dataSource = "http://localhost:3000", - topContributorCount = 1234, - startTime = "2022-05-10T18:57:31.2311892Z", - endTime = "2022-05-10T18:57:31.2311892Z", + dataSource = "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", + topContributorCount = 10, + startTime = "2019-04-01T00:15:00Z", + endTime = "2019-04-01T00:40:00Z", }); - Response response = await client.DetectMultivariateBatchAnomalyAsync("", content); + Response response = await client.DetectMultivariateBatchAnomalyAsync("45aad126-aafd-11ea-b8fb-d89ef3400c5f", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("resultId").ToString()); @@ -754,141 +324,33 @@ public async Task Example_Multivariate_DetectMultivariateBatchAnomaly_ShortVersi [Test] [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_DetectMultivariateBatchAnomaly_ShortVersion_Convenience() + public void Example_Multivariate_DetectMultivariateBatchAnomaly_DetectMultivariateBatchAnomaly_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - Response response = client.DetectMultivariateBatchAnomaly("", options); + MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv"), 10, DateTimeOffset.Parse("2019-04-01T00:15:00Z"), DateTimeOffset.Parse("2019-04-01T00:40:00Z")); + Response response = client.DetectMultivariateBatchAnomaly("45aad126-aafd-11ea-b8fb-d89ef3400c5f", options); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_DetectMultivariateBatchAnomaly_ShortVersion_Convenience_Async() + public async Task Example_Multivariate_DetectMultivariateBatchAnomaly_DetectMultivariateBatchAnomaly_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - Response response = await client.DetectMultivariateBatchAnomalyAsync("", options); + MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv"), 10, DateTimeOffset.Parse("2019-04-01T00:15:00Z"), DateTimeOffset.Parse("2019-04-01T00:40:00Z")); + Response response = await client.DetectMultivariateBatchAnomalyAsync("45aad126-aafd-11ea-b8fb-d89ef3400c5f", options); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_DetectMultivariateBatchAnomaly_AllParameters() + public void Example_Multivariate_DetectMultivariateLastAnomaly_DetectMultivariateLastAnomaly() { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - - using RequestContent content = RequestContent.Create(new - { - dataSource = "http://localhost:3000", - topContributorCount = 1234, - startTime = "2022-05-10T18:57:31.2311892Z", - endTime = "2022-05-10T18:57:31.2311892Z", - }); - Response response = client.DetectMultivariateBatchAnomaly("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("resultId").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("errors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("errors")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("variable").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("dataSource").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("topContributorCount").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("timestamp").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("isAnomaly").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("severity").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("score").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("variable").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("contributionScore").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("correlationChanges").GetProperty("changedVariables")[0].ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("message").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_DetectMultivariateBatchAnomaly_AllParameters_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - - using RequestContent content = RequestContent.Create(new - { - dataSource = "http://localhost:3000", - topContributorCount = 1234, - startTime = "2022-05-10T18:57:31.2311892Z", - endTime = "2022-05-10T18:57:31.2311892Z", - }); - Response response = await client.DetectMultivariateBatchAnomalyAsync("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("resultId").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("errors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("errors")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("variable").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("dataSource").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("topContributorCount").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("summary").GetProperty("setupInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("timestamp").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("isAnomaly").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("severity").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("score").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("variable").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("contributionScore").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("correlationChanges").GetProperty("changedVariables")[0].ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("message").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_DetectMultivariateBatchAnomaly_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - - MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - Response response = client.DetectMultivariateBatchAnomaly("", options); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_DetectMultivariateBatchAnomaly_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - - MultivariateBatchDetectionOptions options = new MultivariateBatchDetectionOptions(new Uri("http://localhost:3000"), 1234, DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); - Response response = await client.DetectMultivariateBatchAnomalyAsync("", options); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_DetectMultivariateLastAnomaly_ShortVersion() - { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); @@ -898,53 +360,218 @@ public void Example_Multivariate_DetectMultivariateLastAnomaly_ShortVersion() { new { -variable = "", +variable = "Variable_1", timestamps = new object[] { -"" +"2021-01-01T00:00:00Z", +"2021-01-01T00:01:00Z", +"2021-01-01T00:02:00Z", +"2021-01-01T00:03:00Z", +"2021-01-01T00:04:00Z", +"2021-01-01T00:05:00Z", +"2021-01-01T00:06:00Z", +"2021-01-01T00:07:00Z", +"2021-01-01T00:08:00Z", +"2021-01-01T00:09:00Z", +"2021-01-01T00:10:00Z", +"2021-01-01T00:11:00Z", +"2021-01-01T00:12:00Z", +"2021-01-01T00:13:00Z", +"2021-01-01T00:14:00Z", +"2021-01-01T00:15:00Z", +"2021-01-01T00:16:00Z", +"2021-01-01T00:17:00Z", +"2021-01-01T00:18:00Z", +"2021-01-01T00:19:00Z", +"2021-01-01T00:20:00Z", +"2021-01-01T00:21:00Z", +"2021-01-01T00:22:00Z", +"2021-01-01T00:23:00Z", +"2021-01-01T00:24:00Z", +"2021-01-01T00:25:00Z", +"2021-01-01T00:26:00Z", +"2021-01-01T00:27:00Z", +"2021-01-01T00:28:00Z", +"2021-01-01T00:29:00Z" }, values = new object[] { -123.45F +0.4551378545933972, +0.7388603950488748, +0.201088255984052, +0.7462812245891899, +0.07308128850401663, +0.33090474587393537, +0.7544925268153315, +0.987506336316328, +0.6665932993421468, +0.6308351543168672, +0.08083310161466228, +0.8414415588668442, +0.514583545640453, +0.0954489875193526, +0.7786793231920507, +0.41646133667960994, +0.030176187583339287, +0.3474214937189324, +0.508530173413991, +0.42451199127255046, +0.2115944222725208, +0.24733519545833516, +0.8791022110982156, +0.9479621899884665, +0.26702703121252136, +0.6954503497669413, +0.1235728391488995, +0.8214915473050647, +0.11813002444192677, +0.8579045951076123 +}, +}, +new +{ +variable = "Variable_2", +timestamps = new object[] +{ +"2021-01-01T00:00:00Z", +"2021-01-01T00:01:00Z", +"2021-01-01T00:02:00Z", +"2021-01-01T00:03:00Z", +"2021-01-01T00:04:00Z", +"2021-01-01T00:05:00Z", +"2021-01-01T00:06:00Z", +"2021-01-01T00:07:00Z", +"2021-01-01T00:08:00Z", +"2021-01-01T00:09:00Z", +"2021-01-01T00:10:00Z", +"2021-01-01T00:11:00Z", +"2021-01-01T00:12:00Z", +"2021-01-01T00:13:00Z", +"2021-01-01T00:14:00Z", +"2021-01-01T00:15:00Z", +"2021-01-01T00:16:00Z", +"2021-01-01T00:17:00Z", +"2021-01-01T00:18:00Z", +"2021-01-01T00:19:00Z", +"2021-01-01T00:20:00Z", +"2021-01-01T00:21:00Z", +"2021-01-01T00:22:00Z", +"2021-01-01T00:23:00Z", +"2021-01-01T00:24:00Z", +"2021-01-01T00:25:00Z", +"2021-01-01T00:26:00Z", +"2021-01-01T00:27:00Z", +"2021-01-01T00:28:00Z", +"2021-01-01T00:29:00Z" +}, +values = new object[] +{ +0.9617871613964145, +0.24903311574778408, +0.4920561254118613, +0.9895601049618598, +0.9171759283128094, +0.5754204711105273, +0.1811033296265634, +0.8852311981742577, +0.9543231904644779, +0.7088012446094262, +0.7843572237149014, +0.7664787010700046, +0.3699552325387093, +0.504519908266789, +0.5848930929950164, +0.7628913396089576, +0.8148405868900065, +0.08540458873739332, +0.03481976727525682, +0.21275099339467762, +0.9836175579199806, +0.9321441483364282, +0.038466608085469534, +0.1723138437622782, +0.8626383410218382, +0.35053229974224254, +0.631141662835182, +0.0730352607990088, +0.08886179043386, +0.7488606040971179 +}, }, -} - }, - topContributorCount = 1234, - }); - Response response = client.DetectMultivariateLastAnomaly("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_DetectMultivariateLastAnomaly_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - - using RequestContent content = RequestContent.Create(new - { - variables = new object[] - { new { -variable = "", +variable = "Variable_3", timestamps = new object[] { -"" +"2021-01-01T00:00:00Z", +"2021-01-01T00:01:00Z", +"2021-01-01T00:02:00Z", +"2021-01-01T00:03:00Z", +"2021-01-01T00:04:00Z", +"2021-01-01T00:05:00Z", +"2021-01-01T00:06:00Z", +"2021-01-01T00:07:00Z", +"2021-01-01T00:08:00Z", +"2021-01-01T00:09:00Z", +"2021-01-01T00:10:00Z", +"2021-01-01T00:11:00Z", +"2021-01-01T00:12:00Z", +"2021-01-01T00:13:00Z", +"2021-01-01T00:14:00Z", +"2021-01-01T00:15:00Z", +"2021-01-01T00:16:00Z", +"2021-01-01T00:17:00Z", +"2021-01-01T00:18:00Z", +"2021-01-01T00:19:00Z", +"2021-01-01T00:20:00Z", +"2021-01-01T00:21:00Z", +"2021-01-01T00:22:00Z", +"2021-01-01T00:23:00Z", +"2021-01-01T00:24:00Z", +"2021-01-01T00:25:00Z", +"2021-01-01T00:26:00Z", +"2021-01-01T00:27:00Z", +"2021-01-01T00:28:00Z", +"2021-01-01T00:29:00Z" }, values = new object[] { -123.45F +0.4030756879437628, +0.15526889968448554, +0.36352226408981103, +0.6051200637229004, +0.8516795018476276, +0.2645605735279929, +0.6810875830037345, +0.9165894221681316, +0.700783245230424, +0.5624155469940331, +0.6277289685127893, +0.15992056539730204, +0.6020964482827594, +0.35937967753105915, +0.8731686034848609, +0.20301549117588935, +0.029261872151168933, +0.6261499548828445, +0.45850782028563386, +0.8275006940083313, +0.032760268834037376, +0.4485202784055029, +0.8915691008748384, +0.891669051517807, +0.9469979353323046, +0.115293087370132, +0.08818772518459506, +0.7426286620589166, +0.32372247468990756, +0.936268139507417 }, } }, - topContributorCount = 1234, + topContributorCount = 10, }); - Response response = await client.DetectMultivariateLastAnomalyAsync("", content); + Response response = client.DetectMultivariateLastAnomaly("45aad126-aafd-11ea-b8fb-d89ef3400c5f", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.ToString()); @@ -952,39 +579,9 @@ public async Task Example_Multivariate_DetectMultivariateLastAnomaly_ShortVersio [Test] [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_DetectMultivariateLastAnomaly_ShortVersion_Convenience() + public async Task Example_Multivariate_DetectMultivariateLastAnomaly_DetectMultivariateLastAnomaly_Async() { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - - MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new VariableValues[] - { -new VariableValues("", new string[]{""}, new float[]{123.45F}) - }, 1234); - Response response = client.DetectMultivariateLastAnomaly("", options); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_DetectMultivariateLastAnomaly_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - - MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new VariableValues[] - { -new VariableValues("", new string[]{""}, new float[]{123.45F}) - }, 1234); - Response response = await client.DetectMultivariateLastAnomalyAsync("", options); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_DetectMultivariateLastAnomaly_AllParameters() - { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); @@ -994,123 +591,266 @@ public void Example_Multivariate_DetectMultivariateLastAnomaly_AllParameters() { new { -variable = "", +variable = "Variable_1", timestamps = new object[] { -"" +"2021-01-01T00:00:00Z", +"2021-01-01T00:01:00Z", +"2021-01-01T00:02:00Z", +"2021-01-01T00:03:00Z", +"2021-01-01T00:04:00Z", +"2021-01-01T00:05:00Z", +"2021-01-01T00:06:00Z", +"2021-01-01T00:07:00Z", +"2021-01-01T00:08:00Z", +"2021-01-01T00:09:00Z", +"2021-01-01T00:10:00Z", +"2021-01-01T00:11:00Z", +"2021-01-01T00:12:00Z", +"2021-01-01T00:13:00Z", +"2021-01-01T00:14:00Z", +"2021-01-01T00:15:00Z", +"2021-01-01T00:16:00Z", +"2021-01-01T00:17:00Z", +"2021-01-01T00:18:00Z", +"2021-01-01T00:19:00Z", +"2021-01-01T00:20:00Z", +"2021-01-01T00:21:00Z", +"2021-01-01T00:22:00Z", +"2021-01-01T00:23:00Z", +"2021-01-01T00:24:00Z", +"2021-01-01T00:25:00Z", +"2021-01-01T00:26:00Z", +"2021-01-01T00:27:00Z", +"2021-01-01T00:28:00Z", +"2021-01-01T00:29:00Z" }, values = new object[] { -123.45F +0.4551378545933972, +0.7388603950488748, +0.201088255984052, +0.7462812245891899, +0.07308128850401663, +0.33090474587393537, +0.7544925268153315, +0.987506336316328, +0.6665932993421468, +0.6308351543168672, +0.08083310161466228, +0.8414415588668442, +0.514583545640453, +0.0954489875193526, +0.7786793231920507, +0.41646133667960994, +0.030176187583339287, +0.3474214937189324, +0.508530173413991, +0.42451199127255046, +0.2115944222725208, +0.24733519545833516, +0.8791022110982156, +0.9479621899884665, +0.26702703121252136, +0.6954503497669413, +0.1235728391488995, +0.8214915473050647, +0.11813002444192677, +0.8579045951076123 +}, +}, +new +{ +variable = "Variable_2", +timestamps = new object[] +{ +"2021-01-01T00:00:00Z", +"2021-01-01T00:01:00Z", +"2021-01-01T00:02:00Z", +"2021-01-01T00:03:00Z", +"2021-01-01T00:04:00Z", +"2021-01-01T00:05:00Z", +"2021-01-01T00:06:00Z", +"2021-01-01T00:07:00Z", +"2021-01-01T00:08:00Z", +"2021-01-01T00:09:00Z", +"2021-01-01T00:10:00Z", +"2021-01-01T00:11:00Z", +"2021-01-01T00:12:00Z", +"2021-01-01T00:13:00Z", +"2021-01-01T00:14:00Z", +"2021-01-01T00:15:00Z", +"2021-01-01T00:16:00Z", +"2021-01-01T00:17:00Z", +"2021-01-01T00:18:00Z", +"2021-01-01T00:19:00Z", +"2021-01-01T00:20:00Z", +"2021-01-01T00:21:00Z", +"2021-01-01T00:22:00Z", +"2021-01-01T00:23:00Z", +"2021-01-01T00:24:00Z", +"2021-01-01T00:25:00Z", +"2021-01-01T00:26:00Z", +"2021-01-01T00:27:00Z", +"2021-01-01T00:28:00Z", +"2021-01-01T00:29:00Z" +}, +values = new object[] +{ +0.9617871613964145, +0.24903311574778408, +0.4920561254118613, +0.9895601049618598, +0.9171759283128094, +0.5754204711105273, +0.1811033296265634, +0.8852311981742577, +0.9543231904644779, +0.7088012446094262, +0.7843572237149014, +0.7664787010700046, +0.3699552325387093, +0.504519908266789, +0.5848930929950164, +0.7628913396089576, +0.8148405868900065, +0.08540458873739332, +0.03481976727525682, +0.21275099339467762, +0.9836175579199806, +0.9321441483364282, +0.038466608085469534, +0.1723138437622782, +0.8626383410218382, +0.35053229974224254, +0.631141662835182, +0.0730352607990088, +0.08886179043386, +0.7488606040971179 +}, }, -} - }, - topContributorCount = 1234, - }); - Response response = client.DetectMultivariateLastAnomaly("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("variableStates")[0].GetProperty("variable").ToString()); - Console.WriteLine(result.GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); - Console.WriteLine(result.GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); - Console.WriteLine(result.GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); - Console.WriteLine(result.GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("timestamp").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("isAnomaly").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("severity").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("score").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("variable").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("contributionScore").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("correlationChanges").GetProperty("changedVariables")[0].ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("message").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_DetectMultivariateLastAnomaly_AllParameters_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - - using RequestContent content = RequestContent.Create(new - { - variables = new object[] - { new { -variable = "", +variable = "Variable_3", timestamps = new object[] { -"" +"2021-01-01T00:00:00Z", +"2021-01-01T00:01:00Z", +"2021-01-01T00:02:00Z", +"2021-01-01T00:03:00Z", +"2021-01-01T00:04:00Z", +"2021-01-01T00:05:00Z", +"2021-01-01T00:06:00Z", +"2021-01-01T00:07:00Z", +"2021-01-01T00:08:00Z", +"2021-01-01T00:09:00Z", +"2021-01-01T00:10:00Z", +"2021-01-01T00:11:00Z", +"2021-01-01T00:12:00Z", +"2021-01-01T00:13:00Z", +"2021-01-01T00:14:00Z", +"2021-01-01T00:15:00Z", +"2021-01-01T00:16:00Z", +"2021-01-01T00:17:00Z", +"2021-01-01T00:18:00Z", +"2021-01-01T00:19:00Z", +"2021-01-01T00:20:00Z", +"2021-01-01T00:21:00Z", +"2021-01-01T00:22:00Z", +"2021-01-01T00:23:00Z", +"2021-01-01T00:24:00Z", +"2021-01-01T00:25:00Z", +"2021-01-01T00:26:00Z", +"2021-01-01T00:27:00Z", +"2021-01-01T00:28:00Z", +"2021-01-01T00:29:00Z" }, values = new object[] { -123.45F +0.4030756879437628, +0.15526889968448554, +0.36352226408981103, +0.6051200637229004, +0.8516795018476276, +0.2645605735279929, +0.6810875830037345, +0.9165894221681316, +0.700783245230424, +0.5624155469940331, +0.6277289685127893, +0.15992056539730204, +0.6020964482827594, +0.35937967753105915, +0.8731686034848609, +0.20301549117588935, +0.029261872151168933, +0.6261499548828445, +0.45850782028563386, +0.8275006940083313, +0.032760268834037376, +0.4485202784055029, +0.8915691008748384, +0.891669051517807, +0.9469979353323046, +0.115293087370132, +0.08818772518459506, +0.7426286620589166, +0.32372247468990756, +0.936268139507417 }, } }, - topContributorCount = 1234, + topContributorCount = 10, }); - Response response = await client.DetectMultivariateLastAnomalyAsync("", content); + Response response = await client.DetectMultivariateLastAnomalyAsync("45aad126-aafd-11ea-b8fb-d89ef3400c5f", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("variableStates")[0].GetProperty("variable").ToString()); - Console.WriteLine(result.GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); - Console.WriteLine(result.GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); - Console.WriteLine(result.GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); - Console.WriteLine(result.GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("timestamp").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("isAnomaly").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("severity").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("score").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("variable").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("contributionScore").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("value").GetProperty("interpretation")[0].GetProperty("correlationChanges").GetProperty("changedVariables")[0].ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("results")[0].GetProperty("errors")[0].GetProperty("message").ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_DetectMultivariateLastAnomaly_AllParameters_Convenience() + public void Example_Multivariate_DetectMultivariateLastAnomaly_DetectMultivariateLastAnomaly_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new VariableValues[] { -new VariableValues("", new string[]{""}, new float[]{123.45F}) - }, 1234); - Response response = client.DetectMultivariateLastAnomaly("", options); +new VariableValues("Variable_1", new string[]{"2021-01-01T00:00:00Z", "2021-01-01T00:01:00Z", "2021-01-01T00:02:00Z", "2021-01-01T00:03:00Z", "2021-01-01T00:04:00Z", "2021-01-01T00:05:00Z", "2021-01-01T00:06:00Z", "2021-01-01T00:07:00Z", "2021-01-01T00:08:00Z", "2021-01-01T00:09:00Z", "2021-01-01T00:10:00Z", "2021-01-01T00:11:00Z", "2021-01-01T00:12:00Z", "2021-01-01T00:13:00Z", "2021-01-01T00:14:00Z", "2021-01-01T00:15:00Z", "2021-01-01T00:16:00Z", "2021-01-01T00:17:00Z", "2021-01-01T00:18:00Z", "2021-01-01T00:19:00Z", "2021-01-01T00:20:00Z", "2021-01-01T00:21:00Z", "2021-01-01T00:22:00Z", "2021-01-01T00:23:00Z", "2021-01-01T00:24:00Z", "2021-01-01T00:25:00Z", "2021-01-01T00:26:00Z", "2021-01-01T00:27:00Z", "2021-01-01T00:28:00Z", "2021-01-01T00:29:00Z"}, new float[]{(float)0.4551378545933972, (float)0.7388603950488748, (float)0.201088255984052, (float)0.7462812245891899, (float)0.07308128850401663, (float)0.33090474587393537, (float)0.7544925268153315, (float)0.987506336316328, (float)0.6665932993421468, (float)0.6308351543168672, (float)0.08083310161466228, (float)0.8414415588668442, (float)0.514583545640453, (float)0.0954489875193526, (float)0.7786793231920507, (float)0.41646133667960994, (float)0.030176187583339287, (float)0.3474214937189324, (float)0.508530173413991, (float)0.42451199127255046, (float)0.2115944222725208, (float)0.24733519545833516, (float)0.8791022110982156, (float)0.9479621899884665, (float)0.26702703121252136, (float)0.6954503497669413, (float)0.1235728391488995, (float)0.8214915473050647, (float)0.11813002444192677, (float)0.8579045951076123}), +new VariableValues("Variable_2", new string[]{"2021-01-01T00:00:00Z", "2021-01-01T00:01:00Z", "2021-01-01T00:02:00Z", "2021-01-01T00:03:00Z", "2021-01-01T00:04:00Z", "2021-01-01T00:05:00Z", "2021-01-01T00:06:00Z", "2021-01-01T00:07:00Z", "2021-01-01T00:08:00Z", "2021-01-01T00:09:00Z", "2021-01-01T00:10:00Z", "2021-01-01T00:11:00Z", "2021-01-01T00:12:00Z", "2021-01-01T00:13:00Z", "2021-01-01T00:14:00Z", "2021-01-01T00:15:00Z", "2021-01-01T00:16:00Z", "2021-01-01T00:17:00Z", "2021-01-01T00:18:00Z", "2021-01-01T00:19:00Z", "2021-01-01T00:20:00Z", "2021-01-01T00:21:00Z", "2021-01-01T00:22:00Z", "2021-01-01T00:23:00Z", "2021-01-01T00:24:00Z", "2021-01-01T00:25:00Z", "2021-01-01T00:26:00Z", "2021-01-01T00:27:00Z", "2021-01-01T00:28:00Z", "2021-01-01T00:29:00Z"}, new float[]{(float)0.9617871613964145, (float)0.24903311574778408, (float)0.4920561254118613, (float)0.9895601049618598, (float)0.9171759283128094, (float)0.5754204711105273, (float)0.1811033296265634, (float)0.8852311981742577, (float)0.9543231904644779, (float)0.7088012446094262, (float)0.7843572237149014, (float)0.7664787010700046, (float)0.3699552325387093, (float)0.504519908266789, (float)0.5848930929950164, (float)0.7628913396089576, (float)0.8148405868900065, (float)0.08540458873739332, (float)0.03481976727525682, (float)0.21275099339467762, (float)0.9836175579199806, (float)0.9321441483364282, (float)0.038466608085469534, (float)0.1723138437622782, (float)0.8626383410218382, (float)0.35053229974224254, (float)0.631141662835182, (float)0.0730352607990088, (float)0.08886179043386, (float)0.7488606040971179}), +new VariableValues("Variable_3", new string[]{"2021-01-01T00:00:00Z", "2021-01-01T00:01:00Z", "2021-01-01T00:02:00Z", "2021-01-01T00:03:00Z", "2021-01-01T00:04:00Z", "2021-01-01T00:05:00Z", "2021-01-01T00:06:00Z", "2021-01-01T00:07:00Z", "2021-01-01T00:08:00Z", "2021-01-01T00:09:00Z", "2021-01-01T00:10:00Z", "2021-01-01T00:11:00Z", "2021-01-01T00:12:00Z", "2021-01-01T00:13:00Z", "2021-01-01T00:14:00Z", "2021-01-01T00:15:00Z", "2021-01-01T00:16:00Z", "2021-01-01T00:17:00Z", "2021-01-01T00:18:00Z", "2021-01-01T00:19:00Z", "2021-01-01T00:20:00Z", "2021-01-01T00:21:00Z", "2021-01-01T00:22:00Z", "2021-01-01T00:23:00Z", "2021-01-01T00:24:00Z", "2021-01-01T00:25:00Z", "2021-01-01T00:26:00Z", "2021-01-01T00:27:00Z", "2021-01-01T00:28:00Z", "2021-01-01T00:29:00Z"}, new float[]{(float)0.4030756879437628, (float)0.15526889968448554, (float)0.36352226408981103, (float)0.6051200637229004, (float)0.8516795018476276, (float)0.2645605735279929, (float)0.6810875830037345, (float)0.9165894221681316, (float)0.700783245230424, (float)0.5624155469940331, (float)0.6277289685127893, (float)0.15992056539730204, (float)0.6020964482827594, (float)0.35937967753105915, (float)0.8731686034848609, (float)0.20301549117588935, (float)0.029261872151168933, (float)0.6261499548828445, (float)0.45850782028563386, (float)0.8275006940083313, (float)0.032760268834037376, (float)0.4485202784055029, (float)0.8915691008748384, (float)0.891669051517807, (float)0.9469979353323046, (float)0.115293087370132, (float)0.08818772518459506, (float)0.7426286620589166, (float)0.32372247468990756, (float)0.936268139507417}) + }, 10); + Response response = client.DetectMultivariateLastAnomaly("45aad126-aafd-11ea-b8fb-d89ef3400c5f", options); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_DetectMultivariateLastAnomaly_AllParameters_Convenience_Async() + public async Task Example_Multivariate_DetectMultivariateLastAnomaly_DetectMultivariateLastAnomaly_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); MultivariateLastDetectionOptions options = new MultivariateLastDetectionOptions(new VariableValues[] { -new VariableValues("", new string[]{""}, new float[]{123.45F}) - }, 1234); - Response response = await client.DetectMultivariateLastAnomalyAsync("", options); +new VariableValues("Variable_1", new string[]{"2021-01-01T00:00:00Z", "2021-01-01T00:01:00Z", "2021-01-01T00:02:00Z", "2021-01-01T00:03:00Z", "2021-01-01T00:04:00Z", "2021-01-01T00:05:00Z", "2021-01-01T00:06:00Z", "2021-01-01T00:07:00Z", "2021-01-01T00:08:00Z", "2021-01-01T00:09:00Z", "2021-01-01T00:10:00Z", "2021-01-01T00:11:00Z", "2021-01-01T00:12:00Z", "2021-01-01T00:13:00Z", "2021-01-01T00:14:00Z", "2021-01-01T00:15:00Z", "2021-01-01T00:16:00Z", "2021-01-01T00:17:00Z", "2021-01-01T00:18:00Z", "2021-01-01T00:19:00Z", "2021-01-01T00:20:00Z", "2021-01-01T00:21:00Z", "2021-01-01T00:22:00Z", "2021-01-01T00:23:00Z", "2021-01-01T00:24:00Z", "2021-01-01T00:25:00Z", "2021-01-01T00:26:00Z", "2021-01-01T00:27:00Z", "2021-01-01T00:28:00Z", "2021-01-01T00:29:00Z"}, new float[]{(float)0.4551378545933972, (float)0.7388603950488748, (float)0.201088255984052, (float)0.7462812245891899, (float)0.07308128850401663, (float)0.33090474587393537, (float)0.7544925268153315, (float)0.987506336316328, (float)0.6665932993421468, (float)0.6308351543168672, (float)0.08083310161466228, (float)0.8414415588668442, (float)0.514583545640453, (float)0.0954489875193526, (float)0.7786793231920507, (float)0.41646133667960994, (float)0.030176187583339287, (float)0.3474214937189324, (float)0.508530173413991, (float)0.42451199127255046, (float)0.2115944222725208, (float)0.24733519545833516, (float)0.8791022110982156, (float)0.9479621899884665, (float)0.26702703121252136, (float)0.6954503497669413, (float)0.1235728391488995, (float)0.8214915473050647, (float)0.11813002444192677, (float)0.8579045951076123}), +new VariableValues("Variable_2", new string[]{"2021-01-01T00:00:00Z", "2021-01-01T00:01:00Z", "2021-01-01T00:02:00Z", "2021-01-01T00:03:00Z", "2021-01-01T00:04:00Z", "2021-01-01T00:05:00Z", "2021-01-01T00:06:00Z", "2021-01-01T00:07:00Z", "2021-01-01T00:08:00Z", "2021-01-01T00:09:00Z", "2021-01-01T00:10:00Z", "2021-01-01T00:11:00Z", "2021-01-01T00:12:00Z", "2021-01-01T00:13:00Z", "2021-01-01T00:14:00Z", "2021-01-01T00:15:00Z", "2021-01-01T00:16:00Z", "2021-01-01T00:17:00Z", "2021-01-01T00:18:00Z", "2021-01-01T00:19:00Z", "2021-01-01T00:20:00Z", "2021-01-01T00:21:00Z", "2021-01-01T00:22:00Z", "2021-01-01T00:23:00Z", "2021-01-01T00:24:00Z", "2021-01-01T00:25:00Z", "2021-01-01T00:26:00Z", "2021-01-01T00:27:00Z", "2021-01-01T00:28:00Z", "2021-01-01T00:29:00Z"}, new float[]{(float)0.9617871613964145, (float)0.24903311574778408, (float)0.4920561254118613, (float)0.9895601049618598, (float)0.9171759283128094, (float)0.5754204711105273, (float)0.1811033296265634, (float)0.8852311981742577, (float)0.9543231904644779, (float)0.7088012446094262, (float)0.7843572237149014, (float)0.7664787010700046, (float)0.3699552325387093, (float)0.504519908266789, (float)0.5848930929950164, (float)0.7628913396089576, (float)0.8148405868900065, (float)0.08540458873739332, (float)0.03481976727525682, (float)0.21275099339467762, (float)0.9836175579199806, (float)0.9321441483364282, (float)0.038466608085469534, (float)0.1723138437622782, (float)0.8626383410218382, (float)0.35053229974224254, (float)0.631141662835182, (float)0.0730352607990088, (float)0.08886179043386, (float)0.7488606040971179}), +new VariableValues("Variable_3", new string[]{"2021-01-01T00:00:00Z", "2021-01-01T00:01:00Z", "2021-01-01T00:02:00Z", "2021-01-01T00:03:00Z", "2021-01-01T00:04:00Z", "2021-01-01T00:05:00Z", "2021-01-01T00:06:00Z", "2021-01-01T00:07:00Z", "2021-01-01T00:08:00Z", "2021-01-01T00:09:00Z", "2021-01-01T00:10:00Z", "2021-01-01T00:11:00Z", "2021-01-01T00:12:00Z", "2021-01-01T00:13:00Z", "2021-01-01T00:14:00Z", "2021-01-01T00:15:00Z", "2021-01-01T00:16:00Z", "2021-01-01T00:17:00Z", "2021-01-01T00:18:00Z", "2021-01-01T00:19:00Z", "2021-01-01T00:20:00Z", "2021-01-01T00:21:00Z", "2021-01-01T00:22:00Z", "2021-01-01T00:23:00Z", "2021-01-01T00:24:00Z", "2021-01-01T00:25:00Z", "2021-01-01T00:26:00Z", "2021-01-01T00:27:00Z", "2021-01-01T00:28:00Z", "2021-01-01T00:29:00Z"}, new float[]{(float)0.4030756879437628, (float)0.15526889968448554, (float)0.36352226408981103, (float)0.6051200637229004, (float)0.8516795018476276, (float)0.2645605735279929, (float)0.6810875830037345, (float)0.9165894221681316, (float)0.700783245230424, (float)0.5624155469940331, (float)0.6277289685127893, (float)0.15992056539730204, (float)0.6020964482827594, (float)0.35937967753105915, (float)0.8731686034848609, (float)0.20301549117588935, (float)0.029261872151168933, (float)0.6261499548828445, (float)0.45850782028563386, (float)0.8275006940083313, (float)0.032760268834037376, (float)0.4485202784055029, (float)0.8915691008748384, (float)0.891669051517807, (float)0.9469979353323046, (float)0.115293087370132, (float)0.08818772518459506, (float)0.7426286620589166, (float)0.32372247468990756, (float)0.936268139507417}) + }, 10); + Response response = await client.DetectMultivariateLastAnomalyAsync("45aad126-aafd-11ea-b8fb-d89ef3400c5f", options); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_GetMultivariateModels_ShortVersion() + public void Example_Multivariate_GetMultivariateModels_ListMultivariateModels() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - foreach (BinaryData item in client.GetMultivariateModels(null, null, null)) + foreach (BinaryData item in client.GetMultivariateModels(0, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); @@ -1121,13 +861,13 @@ public void Example_Multivariate_GetMultivariateModels_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_GetMultivariateModels_ShortVersion_Async() + public async Task Example_Multivariate_GetMultivariateModels_ListMultivariateModels_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - await foreach (BinaryData item in client.GetMultivariateModelsAsync(null, null, null)) + await foreach (BinaryData item in client.GetMultivariateModelsAsync(0, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("modelId").ToString()); @@ -1138,9 +878,9 @@ public async Task Example_Multivariate_GetMultivariateModels_ShortVersion_Async( [Test] [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_GetMultivariateModels_ShortVersion_Convenience() + public void Example_Multivariate_GetMultivariateModels_ListMultivariateModels_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); @@ -1151,9 +891,9 @@ public void Example_Multivariate_GetMultivariateModels_ShortVersion_Convenience( [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_GetMultivariateModels_ShortVersion_Convenience_Async() + public async Task Example_Multivariate_GetMultivariateModels_ListMultivariateModels_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); @@ -1161,107 +901,5 @@ public async Task Example_Multivariate_GetMultivariateModels_ShortVersion_Conven { } } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_GetMultivariateModels_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - - foreach (BinaryData item in client.GetMultivariateModels(1234, 1234, null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSource").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSchema").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("slidingWindow").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("alignMode").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("fillNAMethod").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("paddingValue").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("epochIds")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("trainLosses")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("validationLosses")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("latenciesInSeconds")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("variable").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_GetMultivariateModels_AllParameters_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - - await foreach (BinaryData item in client.GetMultivariateModelsAsync(1234, 1234, null)) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("modelId").ToString()); - Console.WriteLine(result.GetProperty("createdTime").ToString()); - Console.WriteLine(result.GetProperty("lastUpdatedTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSource").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("dataSchema").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("startTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("endTime").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("displayName").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("slidingWindow").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("alignMode").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("fillNAMethod").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("alignPolicy").GetProperty("paddingValue").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("status").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("code").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("errors")[0].GetProperty("message").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("epochIds")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("trainLosses")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("validationLosses")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("modelState").GetProperty("latenciesInSeconds")[0].ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("variable").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("filledNARatio").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("effectiveCount").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("firstTimestamp").ToString()); - Console.WriteLine(result.GetProperty("modelInfo").GetProperty("diagnosticsInfo").GetProperty("variableStates")[0].GetProperty("lastTimestamp").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Multivariate_GetMultivariateModels_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - - foreach (AnomalyDetectionModel item in client.GetMultivariateModels(skip: 1234, maxCount: 1234)) - { - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Multivariate_GetMultivariateModels_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Multivariate client = new AnomalyDetectorClient(endpoint, credential).GetMultivariateClient(); - - await foreach (AnomalyDetectionModel item in client.GetMultivariateModelsAsync(skip: 1234, maxCount: 1234)) - { - } - } } } diff --git a/samples/AnomalyDetector/tests/Generated/Samples/Samples_Univariate.cs b/samples/AnomalyDetector/tests/Generated/Samples/Samples_Univariate.cs index ae81655054e..2d5cd6bc7b0 100644 --- a/samples/AnomalyDetector/tests/Generated/Samples/Samples_Univariate.cs +++ b/samples/AnomalyDetector/tests/Generated/Samples/Samples_Univariate.cs @@ -20,9 +20,9 @@ public partial class Samples_Univariate { [Test] [Ignore("Only validating compilation of examples")] - public void Example_Univariate_DetectUnivariateEntireSeries_ShortVersion() + public void Example_Univariate_DetectUnivariateEntireSeries_UnivariateDetectEntireSeries() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); @@ -32,9 +32,249 @@ public void Example_Univariate_DetectUnivariateEntireSeries_ShortVersion() { new { -value = 123.45F, +timestamp = "1972-01-01T00:00:00Z", +value = 826, +}, +new +{ +timestamp = "1972-02-01T00:00:00Z", +value = 799, +}, +new +{ +timestamp = "1972-03-01T00:00:00Z", +value = 890, +}, +new +{ +timestamp = "1972-04-01T00:00:00Z", +value = 900, +}, +new +{ +timestamp = "1972-05-01T00:00:00Z", +value = 961, +}, +new +{ +timestamp = "1972-06-01T00:00:00Z", +value = 935, +}, +new +{ +timestamp = "1972-07-01T00:00:00Z", +value = 894, +}, +new +{ +timestamp = "1972-08-01T00:00:00Z", +value = 855, +}, +new +{ +timestamp = "1972-09-01T00:00:00Z", +value = 809, +}, +new +{ +timestamp = "1972-10-01T00:00:00Z", +value = 810, +}, +new +{ +timestamp = "1972-11-01T00:00:00Z", +value = 766, +}, +new +{ +timestamp = "1972-12-01T00:00:00Z", +value = 805, +}, +new +{ +timestamp = "1973-01-01T00:00:00Z", +value = 821, +}, +new +{ +timestamp = "1973-02-01T00:00:00Z", +value = 773, +}, +new +{ +timestamp = "1973-03-01T00:00:00Z", +value = 883, +}, +new +{ +timestamp = "1973-04-01T00:00:00Z", +value = 898, +}, +new +{ +timestamp = "1973-05-01T00:00:00Z", +value = 957, +}, +new +{ +timestamp = "1973-06-01T00:00:00Z", +value = 924, +}, +new +{ +timestamp = "1973-07-01T00:00:00Z", +value = 881, +}, +new +{ +timestamp = "1973-08-01T00:00:00Z", +value = 837, +}, +new +{ +timestamp = "1973-09-01T00:00:00Z", +value = 784, +}, +new +{ +timestamp = "1973-10-01T00:00:00Z", +value = 791, +}, +new +{ +timestamp = "1973-11-01T00:00:00Z", +value = 760, +}, +new +{ +timestamp = "1973-12-01T00:00:00Z", +value = 802, +}, +new +{ +timestamp = "1974-01-01T00:00:00Z", +value = 828, +}, +new +{ +timestamp = "1974-02-01T00:00:00Z", +value = 1030, +}, +new +{ +timestamp = "1974-03-01T00:00:00Z", +value = 889, +}, +new +{ +timestamp = "1974-04-01T00:00:00Z", +value = 902, +}, +new +{ +timestamp = "1974-05-01T00:00:00Z", +value = 969, +}, +new +{ +timestamp = "1974-06-01T00:00:00Z", +value = 947, +}, +new +{ +timestamp = "1974-07-01T00:00:00Z", +value = 908, +}, +new +{ +timestamp = "1974-08-01T00:00:00Z", +value = 867, +}, +new +{ +timestamp = "1974-09-01T00:00:00Z", +value = 815, +}, +new +{ +timestamp = "1974-10-01T00:00:00Z", +value = 812, +}, +new +{ +timestamp = "1974-11-01T00:00:00Z", +value = 773, +}, +new +{ +timestamp = "1974-12-01T00:00:00Z", +value = 813, +}, +new +{ +timestamp = "1975-01-01T00:00:00Z", +value = 834, +}, +new +{ +timestamp = "1975-02-01T00:00:00Z", +value = 782, +}, +new +{ +timestamp = "1975-03-01T00:00:00Z", +value = 892, +}, +new +{ +timestamp = "1975-04-01T00:00:00Z", +value = 903, +}, +new +{ +timestamp = "1975-05-01T00:00:00Z", +value = 966, +}, +new +{ +timestamp = "1975-06-01T00:00:00Z", +value = 937, +}, +new +{ +timestamp = "1975-07-01T00:00:00Z", +value = 896, +}, +new +{ +timestamp = "1975-08-01T00:00:00Z", +value = 858, +}, +new +{ +timestamp = "1975-09-01T00:00:00Z", +value = 817, +}, +new +{ +timestamp = "1975-10-01T00:00:00Z", +value = 827, +}, +new +{ +timestamp = "1975-11-01T00:00:00Z", +value = 797, +}, +new +{ +timestamp = "1975-12-01T00:00:00Z", +value = 843, } }, + maxAnomalyRatio = 0.25, + sensitivity = 95, + granularity = "monthly", + imputeMode = "auto", }); Response response = client.DetectUnivariateEntireSeries(content); @@ -50,9 +290,9 @@ public void Example_Univariate_DetectUnivariateEntireSeries_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Univariate_DetectUnivariateEntireSeries_ShortVersion_Async() + public async Task Example_Univariate_DetectUnivariateEntireSeries_UnivariateDetectEntireSeries_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); @@ -62,9 +302,249 @@ public async Task Example_Univariate_DetectUnivariateEntireSeries_ShortVersion_A { new { -value = 123.45F, +timestamp = "1972-01-01T00:00:00Z", +value = 826, +}, +new +{ +timestamp = "1972-02-01T00:00:00Z", +value = 799, +}, +new +{ +timestamp = "1972-03-01T00:00:00Z", +value = 890, +}, +new +{ +timestamp = "1972-04-01T00:00:00Z", +value = 900, +}, +new +{ +timestamp = "1972-05-01T00:00:00Z", +value = 961, +}, +new +{ +timestamp = "1972-06-01T00:00:00Z", +value = 935, +}, +new +{ +timestamp = "1972-07-01T00:00:00Z", +value = 894, +}, +new +{ +timestamp = "1972-08-01T00:00:00Z", +value = 855, +}, +new +{ +timestamp = "1972-09-01T00:00:00Z", +value = 809, +}, +new +{ +timestamp = "1972-10-01T00:00:00Z", +value = 810, +}, +new +{ +timestamp = "1972-11-01T00:00:00Z", +value = 766, +}, +new +{ +timestamp = "1972-12-01T00:00:00Z", +value = 805, +}, +new +{ +timestamp = "1973-01-01T00:00:00Z", +value = 821, +}, +new +{ +timestamp = "1973-02-01T00:00:00Z", +value = 773, +}, +new +{ +timestamp = "1973-03-01T00:00:00Z", +value = 883, +}, +new +{ +timestamp = "1973-04-01T00:00:00Z", +value = 898, +}, +new +{ +timestamp = "1973-05-01T00:00:00Z", +value = 957, +}, +new +{ +timestamp = "1973-06-01T00:00:00Z", +value = 924, +}, +new +{ +timestamp = "1973-07-01T00:00:00Z", +value = 881, +}, +new +{ +timestamp = "1973-08-01T00:00:00Z", +value = 837, +}, +new +{ +timestamp = "1973-09-01T00:00:00Z", +value = 784, +}, +new +{ +timestamp = "1973-10-01T00:00:00Z", +value = 791, +}, +new +{ +timestamp = "1973-11-01T00:00:00Z", +value = 760, +}, +new +{ +timestamp = "1973-12-01T00:00:00Z", +value = 802, +}, +new +{ +timestamp = "1974-01-01T00:00:00Z", +value = 828, +}, +new +{ +timestamp = "1974-02-01T00:00:00Z", +value = 1030, +}, +new +{ +timestamp = "1974-03-01T00:00:00Z", +value = 889, +}, +new +{ +timestamp = "1974-04-01T00:00:00Z", +value = 902, +}, +new +{ +timestamp = "1974-05-01T00:00:00Z", +value = 969, +}, +new +{ +timestamp = "1974-06-01T00:00:00Z", +value = 947, +}, +new +{ +timestamp = "1974-07-01T00:00:00Z", +value = 908, +}, +new +{ +timestamp = "1974-08-01T00:00:00Z", +value = 867, +}, +new +{ +timestamp = "1974-09-01T00:00:00Z", +value = 815, +}, +new +{ +timestamp = "1974-10-01T00:00:00Z", +value = 812, +}, +new +{ +timestamp = "1974-11-01T00:00:00Z", +value = 773, +}, +new +{ +timestamp = "1974-12-01T00:00:00Z", +value = 813, +}, +new +{ +timestamp = "1975-01-01T00:00:00Z", +value = 834, +}, +new +{ +timestamp = "1975-02-01T00:00:00Z", +value = 782, +}, +new +{ +timestamp = "1975-03-01T00:00:00Z", +value = 892, +}, +new +{ +timestamp = "1975-04-01T00:00:00Z", +value = 903, +}, +new +{ +timestamp = "1975-05-01T00:00:00Z", +value = 966, +}, +new +{ +timestamp = "1975-06-01T00:00:00Z", +value = 937, +}, +new +{ +timestamp = "1975-07-01T00:00:00Z", +value = 896, +}, +new +{ +timestamp = "1975-08-01T00:00:00Z", +value = 858, +}, +new +{ +timestamp = "1975-09-01T00:00:00Z", +value = 817, +}, +new +{ +timestamp = "1975-10-01T00:00:00Z", +value = 827, +}, +new +{ +timestamp = "1975-11-01T00:00:00Z", +value = 797, +}, +new +{ +timestamp = "1975-12-01T00:00:00Z", +value = 843, } }, + maxAnomalyRatio = 0.25, + sensitivity = 95, + granularity = "monthly", + imputeMode = "auto", }); Response response = await client.DetectUnivariateEntireSeriesAsync(content); @@ -80,171 +560,433 @@ public async Task Example_Univariate_DetectUnivariateEntireSeries_ShortVersion_A [Test] [Ignore("Only validating compilation of examples")] - public void Example_Univariate_DetectUnivariateEntireSeries_ShortVersion_Convenience() + public void Example_Univariate_DetectUnivariateEntireSeries_UnivariateDetectEntireSeries_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] { -new TimeSeriesPoint(123.45F) - }); +new TimeSeriesPoint(826) +{ +Timestamp = DateTimeOffset.Parse("1972-01-01T00:00:00Z"), +}, +new TimeSeriesPoint(799) +{ +Timestamp = DateTimeOffset.Parse("1972-02-01T00:00:00Z"), +}, +new TimeSeriesPoint(890) +{ +Timestamp = DateTimeOffset.Parse("1972-03-01T00:00:00Z"), +}, +new TimeSeriesPoint(900) +{ +Timestamp = DateTimeOffset.Parse("1972-04-01T00:00:00Z"), +}, +new TimeSeriesPoint(961) +{ +Timestamp = DateTimeOffset.Parse("1972-05-01T00:00:00Z"), +}, +new TimeSeriesPoint(935) +{ +Timestamp = DateTimeOffset.Parse("1972-06-01T00:00:00Z"), +}, +new TimeSeriesPoint(894) +{ +Timestamp = DateTimeOffset.Parse("1972-07-01T00:00:00Z"), +}, +new TimeSeriesPoint(855) +{ +Timestamp = DateTimeOffset.Parse("1972-08-01T00:00:00Z"), +}, +new TimeSeriesPoint(809) +{ +Timestamp = DateTimeOffset.Parse("1972-09-01T00:00:00Z"), +}, +new TimeSeriesPoint(810) +{ +Timestamp = DateTimeOffset.Parse("1972-10-01T00:00:00Z"), +}, +new TimeSeriesPoint(766) +{ +Timestamp = DateTimeOffset.Parse("1972-11-01T00:00:00Z"), +}, +new TimeSeriesPoint(805) +{ +Timestamp = DateTimeOffset.Parse("1972-12-01T00:00:00Z"), +}, +new TimeSeriesPoint(821) +{ +Timestamp = DateTimeOffset.Parse("1973-01-01T00:00:00Z"), +}, +new TimeSeriesPoint(773) +{ +Timestamp = DateTimeOffset.Parse("1973-02-01T00:00:00Z"), +}, +new TimeSeriesPoint(883) +{ +Timestamp = DateTimeOffset.Parse("1973-03-01T00:00:00Z"), +}, +new TimeSeriesPoint(898) +{ +Timestamp = DateTimeOffset.Parse("1973-04-01T00:00:00Z"), +}, +new TimeSeriesPoint(957) +{ +Timestamp = DateTimeOffset.Parse("1973-05-01T00:00:00Z"), +}, +new TimeSeriesPoint(924) +{ +Timestamp = DateTimeOffset.Parse("1973-06-01T00:00:00Z"), +}, +new TimeSeriesPoint(881) +{ +Timestamp = DateTimeOffset.Parse("1973-07-01T00:00:00Z"), +}, +new TimeSeriesPoint(837) +{ +Timestamp = DateTimeOffset.Parse("1973-08-01T00:00:00Z"), +}, +new TimeSeriesPoint(784) +{ +Timestamp = DateTimeOffset.Parse("1973-09-01T00:00:00Z"), +}, +new TimeSeriesPoint(791) +{ +Timestamp = DateTimeOffset.Parse("1973-10-01T00:00:00Z"), +}, +new TimeSeriesPoint(760) +{ +Timestamp = DateTimeOffset.Parse("1973-11-01T00:00:00Z"), +}, +new TimeSeriesPoint(802) +{ +Timestamp = DateTimeOffset.Parse("1973-12-01T00:00:00Z"), +}, +new TimeSeriesPoint(828) +{ +Timestamp = DateTimeOffset.Parse("1974-01-01T00:00:00Z"), +}, +new TimeSeriesPoint(1030) +{ +Timestamp = DateTimeOffset.Parse("1974-02-01T00:00:00Z"), +}, +new TimeSeriesPoint(889) +{ +Timestamp = DateTimeOffset.Parse("1974-03-01T00:00:00Z"), +}, +new TimeSeriesPoint(902) +{ +Timestamp = DateTimeOffset.Parse("1974-04-01T00:00:00Z"), +}, +new TimeSeriesPoint(969) +{ +Timestamp = DateTimeOffset.Parse("1974-05-01T00:00:00Z"), +}, +new TimeSeriesPoint(947) +{ +Timestamp = DateTimeOffset.Parse("1974-06-01T00:00:00Z"), +}, +new TimeSeriesPoint(908) +{ +Timestamp = DateTimeOffset.Parse("1974-07-01T00:00:00Z"), +}, +new TimeSeriesPoint(867) +{ +Timestamp = DateTimeOffset.Parse("1974-08-01T00:00:00Z"), +}, +new TimeSeriesPoint(815) +{ +Timestamp = DateTimeOffset.Parse("1974-09-01T00:00:00Z"), +}, +new TimeSeriesPoint(812) +{ +Timestamp = DateTimeOffset.Parse("1974-10-01T00:00:00Z"), +}, +new TimeSeriesPoint(773) +{ +Timestamp = DateTimeOffset.Parse("1974-11-01T00:00:00Z"), +}, +new TimeSeriesPoint(813) +{ +Timestamp = DateTimeOffset.Parse("1974-12-01T00:00:00Z"), +}, +new TimeSeriesPoint(834) +{ +Timestamp = DateTimeOffset.Parse("1975-01-01T00:00:00Z"), +}, +new TimeSeriesPoint(782) +{ +Timestamp = DateTimeOffset.Parse("1975-02-01T00:00:00Z"), +}, +new TimeSeriesPoint(892) +{ +Timestamp = DateTimeOffset.Parse("1975-03-01T00:00:00Z"), +}, +new TimeSeriesPoint(903) +{ +Timestamp = DateTimeOffset.Parse("1975-04-01T00:00:00Z"), +}, +new TimeSeriesPoint(966) +{ +Timestamp = DateTimeOffset.Parse("1975-05-01T00:00:00Z"), +}, +new TimeSeriesPoint(937) +{ +Timestamp = DateTimeOffset.Parse("1975-06-01T00:00:00Z"), +}, +new TimeSeriesPoint(896) +{ +Timestamp = DateTimeOffset.Parse("1975-07-01T00:00:00Z"), +}, +new TimeSeriesPoint(858) +{ +Timestamp = DateTimeOffset.Parse("1975-08-01T00:00:00Z"), +}, +new TimeSeriesPoint(817) +{ +Timestamp = DateTimeOffset.Parse("1975-09-01T00:00:00Z"), +}, +new TimeSeriesPoint(827) +{ +Timestamp = DateTimeOffset.Parse("1975-10-01T00:00:00Z"), +}, +new TimeSeriesPoint(797) +{ +Timestamp = DateTimeOffset.Parse("1975-11-01T00:00:00Z"), +}, +new TimeSeriesPoint(843) +{ +Timestamp = DateTimeOffset.Parse("1975-12-01T00:00:00Z"), +} + }) + { + Granularity = TimeGranularity.Monthly, + MaxAnomalyRatio = (float)0.25, + Sensitivity = 95, + ImputeMode = ImputeMode.Auto, + }; Response response = client.DetectUnivariateEntireSeries(options); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Univariate_DetectUnivariateEntireSeries_ShortVersion_Convenience_Async() + public async Task Example_Univariate_DetectUnivariateEntireSeries_UnivariateDetectEntireSeries_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] { -new TimeSeriesPoint(123.45F) - }); - Response response = await client.DetectUnivariateEntireSeriesAsync(options); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Univariate_DetectUnivariateEntireSeries_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); - - using RequestContent content = RequestContent.Create(new - { - series = new object[] - { -new +new TimeSeriesPoint(826) { -timestamp = "2022-05-10T18:57:31.2311892Z", -value = 123.45F, -} - }, - granularity = "yearly", - customInterval = 1234, - period = 1234, - maxAnomalyRatio = 123.45F, - sensitivity = 1234, - imputeMode = "auto", - imputeFixedValue = 123.45F, - }); - Response response = client.DetectUnivariateEntireSeries(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("period").ToString()); - Console.WriteLine(result.GetProperty("expectedValues")[0].ToString()); - Console.WriteLine(result.GetProperty("upperMargins")[0].ToString()); - Console.WriteLine(result.GetProperty("lowerMargins")[0].ToString()); - Console.WriteLine(result.GetProperty("isAnomaly")[0].ToString()); - Console.WriteLine(result.GetProperty("isNegativeAnomaly")[0].ToString()); - Console.WriteLine(result.GetProperty("isPositiveAnomaly")[0].ToString()); - Console.WriteLine(result.GetProperty("severity")[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Univariate_DetectUnivariateEntireSeries_AllParameters_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); - - using RequestContent content = RequestContent.Create(new - { - series = new object[] - { -new +Timestamp = DateTimeOffset.Parse("1972-01-01T00:00:00Z"), +}, +new TimeSeriesPoint(799) { -timestamp = "2022-05-10T18:57:31.2311892Z", -value = 123.45F, -} - }, - granularity = "yearly", - customInterval = 1234, - period = 1234, - maxAnomalyRatio = 123.45F, - sensitivity = 1234, - imputeMode = "auto", - imputeFixedValue = 123.45F, - }); - Response response = await client.DetectUnivariateEntireSeriesAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("period").ToString()); - Console.WriteLine(result.GetProperty("expectedValues")[0].ToString()); - Console.WriteLine(result.GetProperty("upperMargins")[0].ToString()); - Console.WriteLine(result.GetProperty("lowerMargins")[0].ToString()); - Console.WriteLine(result.GetProperty("isAnomaly")[0].ToString()); - Console.WriteLine(result.GetProperty("isNegativeAnomaly")[0].ToString()); - Console.WriteLine(result.GetProperty("isPositiveAnomaly")[0].ToString()); - Console.WriteLine(result.GetProperty("severity")[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Univariate_DetectUnivariateEntireSeries_AllParameters_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); - - UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] - { -new TimeSeriesPoint(123.45F) +Timestamp = DateTimeOffset.Parse("1972-02-01T00:00:00Z"), +}, +new TimeSeriesPoint(890) { -Timestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), -} - }) - { - Granularity = TimeGranularity.Yearly, - CustomInterval = 1234, - Period = 1234, - MaxAnomalyRatio = 123.45F, - Sensitivity = 1234, - ImputeMode = ImputeMode.Auto, - ImputeFixedValue = 123.45F, - }; - Response response = client.DetectUnivariateEntireSeries(options); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Univariate_DetectUnivariateEntireSeries_AllParameters_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); - - UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] - { -new TimeSeriesPoint(123.45F) +Timestamp = DateTimeOffset.Parse("1972-03-01T00:00:00Z"), +}, +new TimeSeriesPoint(900) +{ +Timestamp = DateTimeOffset.Parse("1972-04-01T00:00:00Z"), +}, +new TimeSeriesPoint(961) +{ +Timestamp = DateTimeOffset.Parse("1972-05-01T00:00:00Z"), +}, +new TimeSeriesPoint(935) +{ +Timestamp = DateTimeOffset.Parse("1972-06-01T00:00:00Z"), +}, +new TimeSeriesPoint(894) +{ +Timestamp = DateTimeOffset.Parse("1972-07-01T00:00:00Z"), +}, +new TimeSeriesPoint(855) +{ +Timestamp = DateTimeOffset.Parse("1972-08-01T00:00:00Z"), +}, +new TimeSeriesPoint(809) +{ +Timestamp = DateTimeOffset.Parse("1972-09-01T00:00:00Z"), +}, +new TimeSeriesPoint(810) +{ +Timestamp = DateTimeOffset.Parse("1972-10-01T00:00:00Z"), +}, +new TimeSeriesPoint(766) +{ +Timestamp = DateTimeOffset.Parse("1972-11-01T00:00:00Z"), +}, +new TimeSeriesPoint(805) +{ +Timestamp = DateTimeOffset.Parse("1972-12-01T00:00:00Z"), +}, +new TimeSeriesPoint(821) +{ +Timestamp = DateTimeOffset.Parse("1973-01-01T00:00:00Z"), +}, +new TimeSeriesPoint(773) +{ +Timestamp = DateTimeOffset.Parse("1973-02-01T00:00:00Z"), +}, +new TimeSeriesPoint(883) +{ +Timestamp = DateTimeOffset.Parse("1973-03-01T00:00:00Z"), +}, +new TimeSeriesPoint(898) +{ +Timestamp = DateTimeOffset.Parse("1973-04-01T00:00:00Z"), +}, +new TimeSeriesPoint(957) +{ +Timestamp = DateTimeOffset.Parse("1973-05-01T00:00:00Z"), +}, +new TimeSeriesPoint(924) +{ +Timestamp = DateTimeOffset.Parse("1973-06-01T00:00:00Z"), +}, +new TimeSeriesPoint(881) +{ +Timestamp = DateTimeOffset.Parse("1973-07-01T00:00:00Z"), +}, +new TimeSeriesPoint(837) +{ +Timestamp = DateTimeOffset.Parse("1973-08-01T00:00:00Z"), +}, +new TimeSeriesPoint(784) +{ +Timestamp = DateTimeOffset.Parse("1973-09-01T00:00:00Z"), +}, +new TimeSeriesPoint(791) +{ +Timestamp = DateTimeOffset.Parse("1973-10-01T00:00:00Z"), +}, +new TimeSeriesPoint(760) +{ +Timestamp = DateTimeOffset.Parse("1973-11-01T00:00:00Z"), +}, +new TimeSeriesPoint(802) +{ +Timestamp = DateTimeOffset.Parse("1973-12-01T00:00:00Z"), +}, +new TimeSeriesPoint(828) +{ +Timestamp = DateTimeOffset.Parse("1974-01-01T00:00:00Z"), +}, +new TimeSeriesPoint(1030) +{ +Timestamp = DateTimeOffset.Parse("1974-02-01T00:00:00Z"), +}, +new TimeSeriesPoint(889) +{ +Timestamp = DateTimeOffset.Parse("1974-03-01T00:00:00Z"), +}, +new TimeSeriesPoint(902) +{ +Timestamp = DateTimeOffset.Parse("1974-04-01T00:00:00Z"), +}, +new TimeSeriesPoint(969) +{ +Timestamp = DateTimeOffset.Parse("1974-05-01T00:00:00Z"), +}, +new TimeSeriesPoint(947) { -Timestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), +Timestamp = DateTimeOffset.Parse("1974-06-01T00:00:00Z"), +}, +new TimeSeriesPoint(908) +{ +Timestamp = DateTimeOffset.Parse("1974-07-01T00:00:00Z"), +}, +new TimeSeriesPoint(867) +{ +Timestamp = DateTimeOffset.Parse("1974-08-01T00:00:00Z"), +}, +new TimeSeriesPoint(815) +{ +Timestamp = DateTimeOffset.Parse("1974-09-01T00:00:00Z"), +}, +new TimeSeriesPoint(812) +{ +Timestamp = DateTimeOffset.Parse("1974-10-01T00:00:00Z"), +}, +new TimeSeriesPoint(773) +{ +Timestamp = DateTimeOffset.Parse("1974-11-01T00:00:00Z"), +}, +new TimeSeriesPoint(813) +{ +Timestamp = DateTimeOffset.Parse("1974-12-01T00:00:00Z"), +}, +new TimeSeriesPoint(834) +{ +Timestamp = DateTimeOffset.Parse("1975-01-01T00:00:00Z"), +}, +new TimeSeriesPoint(782) +{ +Timestamp = DateTimeOffset.Parse("1975-02-01T00:00:00Z"), +}, +new TimeSeriesPoint(892) +{ +Timestamp = DateTimeOffset.Parse("1975-03-01T00:00:00Z"), +}, +new TimeSeriesPoint(903) +{ +Timestamp = DateTimeOffset.Parse("1975-04-01T00:00:00Z"), +}, +new TimeSeriesPoint(966) +{ +Timestamp = DateTimeOffset.Parse("1975-05-01T00:00:00Z"), +}, +new TimeSeriesPoint(937) +{ +Timestamp = DateTimeOffset.Parse("1975-06-01T00:00:00Z"), +}, +new TimeSeriesPoint(896) +{ +Timestamp = DateTimeOffset.Parse("1975-07-01T00:00:00Z"), +}, +new TimeSeriesPoint(858) +{ +Timestamp = DateTimeOffset.Parse("1975-08-01T00:00:00Z"), +}, +new TimeSeriesPoint(817) +{ +Timestamp = DateTimeOffset.Parse("1975-09-01T00:00:00Z"), +}, +new TimeSeriesPoint(827) +{ +Timestamp = DateTimeOffset.Parse("1975-10-01T00:00:00Z"), +}, +new TimeSeriesPoint(797) +{ +Timestamp = DateTimeOffset.Parse("1975-11-01T00:00:00Z"), +}, +new TimeSeriesPoint(843) +{ +Timestamp = DateTimeOffset.Parse("1975-12-01T00:00:00Z"), } }) { - Granularity = TimeGranularity.Yearly, - CustomInterval = 1234, - Period = 1234, - MaxAnomalyRatio = 123.45F, - Sensitivity = 1234, + Granularity = TimeGranularity.Monthly, + MaxAnomalyRatio = (float)0.25, + Sensitivity = 95, ImputeMode = ImputeMode.Auto, - ImputeFixedValue = 123.45F, }; Response response = await client.DetectUnivariateEntireSeriesAsync(options); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Univariate_DetectUnivariateLastPoint_ShortVersion() + public void Example_Univariate_DetectUnivariateLastPoint_DetectUnivariateLastPoint() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); @@ -254,9 +996,250 @@ public void Example_Univariate_DetectUnivariateLastPoint_ShortVersion() { new { -value = 123.45F, +timestamp = "1972-01-01T00:00:00Z", +value = 826, +}, +new +{ +timestamp = "1972-02-01T00:00:00Z", +value = 799, +}, +new +{ +timestamp = "1972-03-01T00:00:00Z", +value = 890, +}, +new +{ +timestamp = "1972-04-01T00:00:00Z", +value = 900, +}, +new +{ +timestamp = "1972-05-01T00:00:00Z", +value = 961, +}, +new +{ +timestamp = "1972-06-01T00:00:00Z", +value = 935, +}, +new +{ +timestamp = "1972-07-01T00:00:00Z", +value = 894, +}, +new +{ +timestamp = "1972-08-01T00:00:00Z", +value = 855, +}, +new +{ +timestamp = "1972-09-01T00:00:00Z", +value = 809, +}, +new +{ +timestamp = "1972-10-01T00:00:00Z", +value = 810, +}, +new +{ +timestamp = "1972-11-01T00:00:00Z", +value = 766, +}, +new +{ +timestamp = "1972-12-01T00:00:00Z", +value = 805, +}, +new +{ +timestamp = "1973-01-01T00:00:00Z", +value = 821, +}, +new +{ +timestamp = "1973-02-01T00:00:00Z", +value = 773, +}, +new +{ +timestamp = "1973-03-01T00:00:00Z", +value = 883, +}, +new +{ +timestamp = "1973-04-01T00:00:00Z", +value = 898, +}, +new +{ +timestamp = "1973-05-01T00:00:00Z", +value = 957, +}, +new +{ +timestamp = "1973-06-01T00:00:00Z", +value = 924, +}, +new +{ +timestamp = "1973-07-01T00:00:00Z", +value = 881, +}, +new +{ +timestamp = "1973-08-01T00:00:00Z", +value = 837, +}, +new +{ +timestamp = "1973-09-01T00:00:00Z", +value = 784, +}, +new +{ +timestamp = "1973-10-01T00:00:00Z", +value = 791, +}, +new +{ +timestamp = "1973-11-01T00:00:00Z", +value = 760, +}, +new +{ +timestamp = "1973-12-01T00:00:00Z", +value = 802, +}, +new +{ +timestamp = "1974-01-01T00:00:00Z", +value = 828, +}, +new +{ +timestamp = "1974-02-01T00:00:00Z", +value = 1030, +}, +new +{ +timestamp = "1974-03-01T00:00:00Z", +value = 889, +}, +new +{ +timestamp = "1974-04-01T00:00:00Z", +value = 902, +}, +new +{ +timestamp = "1974-05-01T00:00:00Z", +value = 969, +}, +new +{ +timestamp = "1974-06-01T00:00:00Z", +value = 947, +}, +new +{ +timestamp = "1974-07-01T00:00:00Z", +value = 908, +}, +new +{ +timestamp = "1974-08-01T00:00:00Z", +value = 867, +}, +new +{ +timestamp = "1974-09-01T00:00:00Z", +value = 815, +}, +new +{ +timestamp = "1974-10-01T00:00:00Z", +value = 812, +}, +new +{ +timestamp = "1974-11-01T00:00:00Z", +value = 773, +}, +new +{ +timestamp = "1974-12-01T00:00:00Z", +value = 813, +}, +new +{ +timestamp = "1975-01-01T00:00:00Z", +value = 834, +}, +new +{ +timestamp = "1975-02-01T00:00:00Z", +value = 782, +}, +new +{ +timestamp = "1975-03-01T00:00:00Z", +value = 892, +}, +new +{ +timestamp = "1975-04-01T00:00:00Z", +value = 903, +}, +new +{ +timestamp = "1975-05-01T00:00:00Z", +value = 966, +}, +new +{ +timestamp = "1975-06-01T00:00:00Z", +value = 937, +}, +new +{ +timestamp = "1975-07-01T00:00:00Z", +value = 896, +}, +new +{ +timestamp = "1975-08-01T00:00:00Z", +value = 858, +}, +new +{ +timestamp = "1975-09-01T00:00:00Z", +value = 817, +}, +new +{ +timestamp = "1975-10-01T00:00:00Z", +value = 827, +}, +new +{ +timestamp = "1975-11-01T00:00:00Z", +value = 797, +}, +new +{ +timestamp = "1975-12-01T00:00:00Z", +value = 843, } }, + maxAnomalyRatio = 0.25, + sensitivity = 95, + granularity = "monthly", + imputeMode = "fixed", + imputeFixedValue = 800, }); Response response = client.DetectUnivariateLastPoint(content); @@ -273,9 +1256,9 @@ public void Example_Univariate_DetectUnivariateLastPoint_ShortVersion() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Univariate_DetectUnivariateLastPoint_ShortVersion_Async() + public async Task Example_Univariate_DetectUnivariateLastPoint_DetectUnivariateLastPoint_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); @@ -285,118 +1268,250 @@ public async Task Example_Univariate_DetectUnivariateLastPoint_ShortVersion_Asyn { new { -value = 123.45F, -} - }, - }); - Response response = await client.DetectUnivariateLastPointAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("period").ToString()); - Console.WriteLine(result.GetProperty("suggestedWindow").ToString()); - Console.WriteLine(result.GetProperty("expectedValue").ToString()); - Console.WriteLine(result.GetProperty("upperMargin").ToString()); - Console.WriteLine(result.GetProperty("lowerMargin").ToString()); - Console.WriteLine(result.GetProperty("isAnomaly").ToString()); - Console.WriteLine(result.GetProperty("isNegativeAnomaly").ToString()); - Console.WriteLine(result.GetProperty("isPositiveAnomaly").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Univariate_DetectUnivariateLastPoint_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); - - UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] - { -new TimeSeriesPoint(123.45F) - }); - Response response = client.DetectUnivariateLastPoint(options); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Univariate_DetectUnivariateLastPoint_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); - - UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] - { -new TimeSeriesPoint(123.45F) - }); - Response response = await client.DetectUnivariateLastPointAsync(options); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Univariate_DetectUnivariateLastPoint_AllParameters() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); - - using RequestContent content = RequestContent.Create(new - { - series = new object[] - { +timestamp = "1972-01-01T00:00:00Z", +value = 826, +}, new { -timestamp = "2022-05-10T18:57:31.2311892Z", -value = 123.45F, -} - }, - granularity = "yearly", - customInterval = 1234, - period = 1234, - maxAnomalyRatio = 123.45F, - sensitivity = 1234, - imputeMode = "auto", - imputeFixedValue = 123.45F, - }); - Response response = client.DetectUnivariateLastPoint(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("period").ToString()); - Console.WriteLine(result.GetProperty("suggestedWindow").ToString()); - Console.WriteLine(result.GetProperty("expectedValue").ToString()); - Console.WriteLine(result.GetProperty("upperMargin").ToString()); - Console.WriteLine(result.GetProperty("lowerMargin").ToString()); - Console.WriteLine(result.GetProperty("isAnomaly").ToString()); - Console.WriteLine(result.GetProperty("isNegativeAnomaly").ToString()); - Console.WriteLine(result.GetProperty("isPositiveAnomaly").ToString()); - Console.WriteLine(result.GetProperty("severity").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Univariate_DetectUnivariateLastPoint_AllParameters_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); - - using RequestContent content = RequestContent.Create(new - { - series = new object[] - { +timestamp = "1972-02-01T00:00:00Z", +value = 799, +}, +new +{ +timestamp = "1972-03-01T00:00:00Z", +value = 890, +}, +new +{ +timestamp = "1972-04-01T00:00:00Z", +value = 900, +}, +new +{ +timestamp = "1972-05-01T00:00:00Z", +value = 961, +}, +new +{ +timestamp = "1972-06-01T00:00:00Z", +value = 935, +}, +new +{ +timestamp = "1972-07-01T00:00:00Z", +value = 894, +}, +new +{ +timestamp = "1972-08-01T00:00:00Z", +value = 855, +}, +new +{ +timestamp = "1972-09-01T00:00:00Z", +value = 809, +}, +new +{ +timestamp = "1972-10-01T00:00:00Z", +value = 810, +}, +new +{ +timestamp = "1972-11-01T00:00:00Z", +value = 766, +}, +new +{ +timestamp = "1972-12-01T00:00:00Z", +value = 805, +}, +new +{ +timestamp = "1973-01-01T00:00:00Z", +value = 821, +}, +new +{ +timestamp = "1973-02-01T00:00:00Z", +value = 773, +}, +new +{ +timestamp = "1973-03-01T00:00:00Z", +value = 883, +}, +new +{ +timestamp = "1973-04-01T00:00:00Z", +value = 898, +}, +new +{ +timestamp = "1973-05-01T00:00:00Z", +value = 957, +}, +new +{ +timestamp = "1973-06-01T00:00:00Z", +value = 924, +}, +new +{ +timestamp = "1973-07-01T00:00:00Z", +value = 881, +}, +new +{ +timestamp = "1973-08-01T00:00:00Z", +value = 837, +}, +new +{ +timestamp = "1973-09-01T00:00:00Z", +value = 784, +}, +new +{ +timestamp = "1973-10-01T00:00:00Z", +value = 791, +}, +new +{ +timestamp = "1973-11-01T00:00:00Z", +value = 760, +}, +new +{ +timestamp = "1973-12-01T00:00:00Z", +value = 802, +}, +new +{ +timestamp = "1974-01-01T00:00:00Z", +value = 828, +}, +new +{ +timestamp = "1974-02-01T00:00:00Z", +value = 1030, +}, +new +{ +timestamp = "1974-03-01T00:00:00Z", +value = 889, +}, +new +{ +timestamp = "1974-04-01T00:00:00Z", +value = 902, +}, +new +{ +timestamp = "1974-05-01T00:00:00Z", +value = 969, +}, +new +{ +timestamp = "1974-06-01T00:00:00Z", +value = 947, +}, +new +{ +timestamp = "1974-07-01T00:00:00Z", +value = 908, +}, +new +{ +timestamp = "1974-08-01T00:00:00Z", +value = 867, +}, +new +{ +timestamp = "1974-09-01T00:00:00Z", +value = 815, +}, +new +{ +timestamp = "1974-10-01T00:00:00Z", +value = 812, +}, +new +{ +timestamp = "1974-11-01T00:00:00Z", +value = 773, +}, +new +{ +timestamp = "1974-12-01T00:00:00Z", +value = 813, +}, +new +{ +timestamp = "1975-01-01T00:00:00Z", +value = 834, +}, +new +{ +timestamp = "1975-02-01T00:00:00Z", +value = 782, +}, +new +{ +timestamp = "1975-03-01T00:00:00Z", +value = 892, +}, +new +{ +timestamp = "1975-04-01T00:00:00Z", +value = 903, +}, +new +{ +timestamp = "1975-05-01T00:00:00Z", +value = 966, +}, +new +{ +timestamp = "1975-06-01T00:00:00Z", +value = 937, +}, +new +{ +timestamp = "1975-07-01T00:00:00Z", +value = 896, +}, +new +{ +timestamp = "1975-08-01T00:00:00Z", +value = 858, +}, +new +{ +timestamp = "1975-09-01T00:00:00Z", +value = 817, +}, +new +{ +timestamp = "1975-10-01T00:00:00Z", +value = 827, +}, +new +{ +timestamp = "1975-11-01T00:00:00Z", +value = 797, +}, new { -timestamp = "2022-05-10T18:57:31.2311892Z", -value = 123.45F, +timestamp = "1975-12-01T00:00:00Z", +value = 843, } }, - granularity = "yearly", - customInterval = 1234, - period = 1234, - maxAnomalyRatio = 123.45F, - sensitivity = 1234, - imputeMode = "auto", - imputeFixedValue = 123.45F, + maxAnomalyRatio = 0.25, + sensitivity = 95, + granularity = "monthly", + imputeMode = "fixed", + imputeFixedValue = 800, }); Response response = await client.DetectUnivariateLastPointAsync(content); @@ -409,68 +1524,439 @@ public async Task Example_Univariate_DetectUnivariateLastPoint_AllParameters_Asy Console.WriteLine(result.GetProperty("isAnomaly").ToString()); Console.WriteLine(result.GetProperty("isNegativeAnomaly").ToString()); Console.WriteLine(result.GetProperty("isPositiveAnomaly").ToString()); - Console.WriteLine(result.GetProperty("severity").ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Univariate_DetectUnivariateLastPoint_AllParameters_Convenience() + public void Example_Univariate_DetectUnivariateLastPoint_DetectUnivariateLastPoint_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] { -new TimeSeriesPoint(123.45F) +new TimeSeriesPoint(826) +{ +Timestamp = DateTimeOffset.Parse("1972-01-01T00:00:00Z"), +}, +new TimeSeriesPoint(799) +{ +Timestamp = DateTimeOffset.Parse("1972-02-01T00:00:00Z"), +}, +new TimeSeriesPoint(890) +{ +Timestamp = DateTimeOffset.Parse("1972-03-01T00:00:00Z"), +}, +new TimeSeriesPoint(900) +{ +Timestamp = DateTimeOffset.Parse("1972-04-01T00:00:00Z"), +}, +new TimeSeriesPoint(961) +{ +Timestamp = DateTimeOffset.Parse("1972-05-01T00:00:00Z"), +}, +new TimeSeriesPoint(935) +{ +Timestamp = DateTimeOffset.Parse("1972-06-01T00:00:00Z"), +}, +new TimeSeriesPoint(894) +{ +Timestamp = DateTimeOffset.Parse("1972-07-01T00:00:00Z"), +}, +new TimeSeriesPoint(855) +{ +Timestamp = DateTimeOffset.Parse("1972-08-01T00:00:00Z"), +}, +new TimeSeriesPoint(809) { -Timestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), +Timestamp = DateTimeOffset.Parse("1972-09-01T00:00:00Z"), +}, +new TimeSeriesPoint(810) +{ +Timestamp = DateTimeOffset.Parse("1972-10-01T00:00:00Z"), +}, +new TimeSeriesPoint(766) +{ +Timestamp = DateTimeOffset.Parse("1972-11-01T00:00:00Z"), +}, +new TimeSeriesPoint(805) +{ +Timestamp = DateTimeOffset.Parse("1972-12-01T00:00:00Z"), +}, +new TimeSeriesPoint(821) +{ +Timestamp = DateTimeOffset.Parse("1973-01-01T00:00:00Z"), +}, +new TimeSeriesPoint(773) +{ +Timestamp = DateTimeOffset.Parse("1973-02-01T00:00:00Z"), +}, +new TimeSeriesPoint(883) +{ +Timestamp = DateTimeOffset.Parse("1973-03-01T00:00:00Z"), +}, +new TimeSeriesPoint(898) +{ +Timestamp = DateTimeOffset.Parse("1973-04-01T00:00:00Z"), +}, +new TimeSeriesPoint(957) +{ +Timestamp = DateTimeOffset.Parse("1973-05-01T00:00:00Z"), +}, +new TimeSeriesPoint(924) +{ +Timestamp = DateTimeOffset.Parse("1973-06-01T00:00:00Z"), +}, +new TimeSeriesPoint(881) +{ +Timestamp = DateTimeOffset.Parse("1973-07-01T00:00:00Z"), +}, +new TimeSeriesPoint(837) +{ +Timestamp = DateTimeOffset.Parse("1973-08-01T00:00:00Z"), +}, +new TimeSeriesPoint(784) +{ +Timestamp = DateTimeOffset.Parse("1973-09-01T00:00:00Z"), +}, +new TimeSeriesPoint(791) +{ +Timestamp = DateTimeOffset.Parse("1973-10-01T00:00:00Z"), +}, +new TimeSeriesPoint(760) +{ +Timestamp = DateTimeOffset.Parse("1973-11-01T00:00:00Z"), +}, +new TimeSeriesPoint(802) +{ +Timestamp = DateTimeOffset.Parse("1973-12-01T00:00:00Z"), +}, +new TimeSeriesPoint(828) +{ +Timestamp = DateTimeOffset.Parse("1974-01-01T00:00:00Z"), +}, +new TimeSeriesPoint(1030) +{ +Timestamp = DateTimeOffset.Parse("1974-02-01T00:00:00Z"), +}, +new TimeSeriesPoint(889) +{ +Timestamp = DateTimeOffset.Parse("1974-03-01T00:00:00Z"), +}, +new TimeSeriesPoint(902) +{ +Timestamp = DateTimeOffset.Parse("1974-04-01T00:00:00Z"), +}, +new TimeSeriesPoint(969) +{ +Timestamp = DateTimeOffset.Parse("1974-05-01T00:00:00Z"), +}, +new TimeSeriesPoint(947) +{ +Timestamp = DateTimeOffset.Parse("1974-06-01T00:00:00Z"), +}, +new TimeSeriesPoint(908) +{ +Timestamp = DateTimeOffset.Parse("1974-07-01T00:00:00Z"), +}, +new TimeSeriesPoint(867) +{ +Timestamp = DateTimeOffset.Parse("1974-08-01T00:00:00Z"), +}, +new TimeSeriesPoint(815) +{ +Timestamp = DateTimeOffset.Parse("1974-09-01T00:00:00Z"), +}, +new TimeSeriesPoint(812) +{ +Timestamp = DateTimeOffset.Parse("1974-10-01T00:00:00Z"), +}, +new TimeSeriesPoint(773) +{ +Timestamp = DateTimeOffset.Parse("1974-11-01T00:00:00Z"), +}, +new TimeSeriesPoint(813) +{ +Timestamp = DateTimeOffset.Parse("1974-12-01T00:00:00Z"), +}, +new TimeSeriesPoint(834) +{ +Timestamp = DateTimeOffset.Parse("1975-01-01T00:00:00Z"), +}, +new TimeSeriesPoint(782) +{ +Timestamp = DateTimeOffset.Parse("1975-02-01T00:00:00Z"), +}, +new TimeSeriesPoint(892) +{ +Timestamp = DateTimeOffset.Parse("1975-03-01T00:00:00Z"), +}, +new TimeSeriesPoint(903) +{ +Timestamp = DateTimeOffset.Parse("1975-04-01T00:00:00Z"), +}, +new TimeSeriesPoint(966) +{ +Timestamp = DateTimeOffset.Parse("1975-05-01T00:00:00Z"), +}, +new TimeSeriesPoint(937) +{ +Timestamp = DateTimeOffset.Parse("1975-06-01T00:00:00Z"), +}, +new TimeSeriesPoint(896) +{ +Timestamp = DateTimeOffset.Parse("1975-07-01T00:00:00Z"), +}, +new TimeSeriesPoint(858) +{ +Timestamp = DateTimeOffset.Parse("1975-08-01T00:00:00Z"), +}, +new TimeSeriesPoint(817) +{ +Timestamp = DateTimeOffset.Parse("1975-09-01T00:00:00Z"), +}, +new TimeSeriesPoint(827) +{ +Timestamp = DateTimeOffset.Parse("1975-10-01T00:00:00Z"), +}, +new TimeSeriesPoint(797) +{ +Timestamp = DateTimeOffset.Parse("1975-11-01T00:00:00Z"), +}, +new TimeSeriesPoint(843) +{ +Timestamp = DateTimeOffset.Parse("1975-12-01T00:00:00Z"), } }) { - Granularity = TimeGranularity.Yearly, - CustomInterval = 1234, - Period = 1234, - MaxAnomalyRatio = 123.45F, - Sensitivity = 1234, - ImputeMode = ImputeMode.Auto, - ImputeFixedValue = 123.45F, + Granularity = TimeGranularity.Monthly, + MaxAnomalyRatio = (float)0.25, + Sensitivity = 95, + ImputeMode = ImputeMode.Fixed, + ImputeFixedValue = 800, }; Response response = client.DetectUnivariateLastPoint(options); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Univariate_DetectUnivariateLastPoint_AllParameters_Convenience_Async() + public async Task Example_Univariate_DetectUnivariateLastPoint_DetectUnivariateLastPoint_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); UnivariateDetectionOptions options = new UnivariateDetectionOptions(new TimeSeriesPoint[] { -new TimeSeriesPoint(123.45F) +new TimeSeriesPoint(826) +{ +Timestamp = DateTimeOffset.Parse("1972-01-01T00:00:00Z"), +}, +new TimeSeriesPoint(799) +{ +Timestamp = DateTimeOffset.Parse("1972-02-01T00:00:00Z"), +}, +new TimeSeriesPoint(890) +{ +Timestamp = DateTimeOffset.Parse("1972-03-01T00:00:00Z"), +}, +new TimeSeriesPoint(900) +{ +Timestamp = DateTimeOffset.Parse("1972-04-01T00:00:00Z"), +}, +new TimeSeriesPoint(961) +{ +Timestamp = DateTimeOffset.Parse("1972-05-01T00:00:00Z"), +}, +new TimeSeriesPoint(935) +{ +Timestamp = DateTimeOffset.Parse("1972-06-01T00:00:00Z"), +}, +new TimeSeriesPoint(894) +{ +Timestamp = DateTimeOffset.Parse("1972-07-01T00:00:00Z"), +}, +new TimeSeriesPoint(855) +{ +Timestamp = DateTimeOffset.Parse("1972-08-01T00:00:00Z"), +}, +new TimeSeriesPoint(809) +{ +Timestamp = DateTimeOffset.Parse("1972-09-01T00:00:00Z"), +}, +new TimeSeriesPoint(810) +{ +Timestamp = DateTimeOffset.Parse("1972-10-01T00:00:00Z"), +}, +new TimeSeriesPoint(766) +{ +Timestamp = DateTimeOffset.Parse("1972-11-01T00:00:00Z"), +}, +new TimeSeriesPoint(805) +{ +Timestamp = DateTimeOffset.Parse("1972-12-01T00:00:00Z"), +}, +new TimeSeriesPoint(821) +{ +Timestamp = DateTimeOffset.Parse("1973-01-01T00:00:00Z"), +}, +new TimeSeriesPoint(773) +{ +Timestamp = DateTimeOffset.Parse("1973-02-01T00:00:00Z"), +}, +new TimeSeriesPoint(883) +{ +Timestamp = DateTimeOffset.Parse("1973-03-01T00:00:00Z"), +}, +new TimeSeriesPoint(898) +{ +Timestamp = DateTimeOffset.Parse("1973-04-01T00:00:00Z"), +}, +new TimeSeriesPoint(957) +{ +Timestamp = DateTimeOffset.Parse("1973-05-01T00:00:00Z"), +}, +new TimeSeriesPoint(924) +{ +Timestamp = DateTimeOffset.Parse("1973-06-01T00:00:00Z"), +}, +new TimeSeriesPoint(881) +{ +Timestamp = DateTimeOffset.Parse("1973-07-01T00:00:00Z"), +}, +new TimeSeriesPoint(837) +{ +Timestamp = DateTimeOffset.Parse("1973-08-01T00:00:00Z"), +}, +new TimeSeriesPoint(784) +{ +Timestamp = DateTimeOffset.Parse("1973-09-01T00:00:00Z"), +}, +new TimeSeriesPoint(791) +{ +Timestamp = DateTimeOffset.Parse("1973-10-01T00:00:00Z"), +}, +new TimeSeriesPoint(760) +{ +Timestamp = DateTimeOffset.Parse("1973-11-01T00:00:00Z"), +}, +new TimeSeriesPoint(802) +{ +Timestamp = DateTimeOffset.Parse("1973-12-01T00:00:00Z"), +}, +new TimeSeriesPoint(828) { -Timestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), +Timestamp = DateTimeOffset.Parse("1974-01-01T00:00:00Z"), +}, +new TimeSeriesPoint(1030) +{ +Timestamp = DateTimeOffset.Parse("1974-02-01T00:00:00Z"), +}, +new TimeSeriesPoint(889) +{ +Timestamp = DateTimeOffset.Parse("1974-03-01T00:00:00Z"), +}, +new TimeSeriesPoint(902) +{ +Timestamp = DateTimeOffset.Parse("1974-04-01T00:00:00Z"), +}, +new TimeSeriesPoint(969) +{ +Timestamp = DateTimeOffset.Parse("1974-05-01T00:00:00Z"), +}, +new TimeSeriesPoint(947) +{ +Timestamp = DateTimeOffset.Parse("1974-06-01T00:00:00Z"), +}, +new TimeSeriesPoint(908) +{ +Timestamp = DateTimeOffset.Parse("1974-07-01T00:00:00Z"), +}, +new TimeSeriesPoint(867) +{ +Timestamp = DateTimeOffset.Parse("1974-08-01T00:00:00Z"), +}, +new TimeSeriesPoint(815) +{ +Timestamp = DateTimeOffset.Parse("1974-09-01T00:00:00Z"), +}, +new TimeSeriesPoint(812) +{ +Timestamp = DateTimeOffset.Parse("1974-10-01T00:00:00Z"), +}, +new TimeSeriesPoint(773) +{ +Timestamp = DateTimeOffset.Parse("1974-11-01T00:00:00Z"), +}, +new TimeSeriesPoint(813) +{ +Timestamp = DateTimeOffset.Parse("1974-12-01T00:00:00Z"), +}, +new TimeSeriesPoint(834) +{ +Timestamp = DateTimeOffset.Parse("1975-01-01T00:00:00Z"), +}, +new TimeSeriesPoint(782) +{ +Timestamp = DateTimeOffset.Parse("1975-02-01T00:00:00Z"), +}, +new TimeSeriesPoint(892) +{ +Timestamp = DateTimeOffset.Parse("1975-03-01T00:00:00Z"), +}, +new TimeSeriesPoint(903) +{ +Timestamp = DateTimeOffset.Parse("1975-04-01T00:00:00Z"), +}, +new TimeSeriesPoint(966) +{ +Timestamp = DateTimeOffset.Parse("1975-05-01T00:00:00Z"), +}, +new TimeSeriesPoint(937) +{ +Timestamp = DateTimeOffset.Parse("1975-06-01T00:00:00Z"), +}, +new TimeSeriesPoint(896) +{ +Timestamp = DateTimeOffset.Parse("1975-07-01T00:00:00Z"), +}, +new TimeSeriesPoint(858) +{ +Timestamp = DateTimeOffset.Parse("1975-08-01T00:00:00Z"), +}, +new TimeSeriesPoint(817) +{ +Timestamp = DateTimeOffset.Parse("1975-09-01T00:00:00Z"), +}, +new TimeSeriesPoint(827) +{ +Timestamp = DateTimeOffset.Parse("1975-10-01T00:00:00Z"), +}, +new TimeSeriesPoint(797) +{ +Timestamp = DateTimeOffset.Parse("1975-11-01T00:00:00Z"), +}, +new TimeSeriesPoint(843) +{ +Timestamp = DateTimeOffset.Parse("1975-12-01T00:00:00Z"), } }) { - Granularity = TimeGranularity.Yearly, - CustomInterval = 1234, - Period = 1234, - MaxAnomalyRatio = 123.45F, - Sensitivity = 1234, - ImputeMode = ImputeMode.Auto, - ImputeFixedValue = 123.45F, + Granularity = TimeGranularity.Monthly, + MaxAnomalyRatio = (float)0.25, + Sensitivity = 95, + ImputeMode = ImputeMode.Fixed, + ImputeFixedValue = 800, }; Response response = await client.DetectUnivariateLastPointAsync(options); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Univariate_DetectUnivariateChangePoint_ShortVersion() + public void Example_Univariate_DetectUnivariateChangePoint_UnivariateDetectionOfAChangePoint() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); @@ -480,77 +1966,1307 @@ public void Example_Univariate_DetectUnivariateChangePoint_ShortVersion() { new { -value = 123.45F, -} - }, - granularity = "yearly", - }); - Response response = client.DetectUnivariateChangePoint(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Univariate_DetectUnivariateChangePoint_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); - - using RequestContent content = RequestContent.Create(new - { - series = new object[] - { +timestamp = "2017-01-01T06:45:00Z", +value = 1639196, +}, new { -value = 123.45F, -} - }, - granularity = "yearly", - }); - Response response = await client.DetectUnivariateChangePointAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_Univariate_DetectUnivariateChangePoint_ShortVersion_Convenience() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); - - UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[] - { -new TimeSeriesPoint(123.45F) - }, TimeGranularity.Yearly); - Response response = client.DetectUnivariateChangePoint(options); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Univariate_DetectUnivariateChangePoint_ShortVersion_Convenience_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); +timestamp = "2017-01-01T06:50:00Z", +value = 1639290, +}, +new +{ +timestamp = "2017-01-01T06:55:00Z", +value = 1667293, +}, +new +{ +timestamp = "2017-01-01T07:00:00Z", +value = 1703130, +}, +new +{ +timestamp = "2017-01-01T07:05:00Z", +value = 1650912, +}, +new +{ +timestamp = "2017-01-01T07:10:00Z", +value = 1653596, +}, +new +{ +timestamp = "2017-01-01T07:15:00Z", +value = 1653793, +}, +new +{ +timestamp = "2017-01-01T07:20:00Z", +value = 1653795, +}, +new +{ +timestamp = "2017-01-01T07:25:00Z", +value = 1663471, +}, +new +{ +timestamp = "2017-01-01T07:30:00Z", +value = 1662358, +}, +new +{ +timestamp = "2017-01-01T07:35:00Z", +value = 1664320, +}, +new +{ +timestamp = "2017-01-01T07:40:00Z", +value = 1664942, +}, +new +{ +timestamp = "2017-01-01T07:45:00Z", +value = 1664966, +}, +new +{ +timestamp = "2017-01-01T07:50:00Z", +value = 1724271, +}, +new +{ +timestamp = "2017-01-01T07:55:00Z", +value = 1678720, +}, +new +{ +timestamp = "2017-01-01T08:00:00Z", +value = 1672536, +}, +new +{ +timestamp = "2017-01-01T08:05:00Z", +value = 1672544, +}, +new +{ +timestamp = "2017-01-01T08:10:00Z", +value = 1672364, +}, +new +{ +timestamp = "2017-01-01T08:15:00Z", +value = 1672912, +}, +new +{ +timestamp = "2017-01-01T08:20:00Z", +value = 1672736, +}, +new +{ +timestamp = "2017-01-01T08:25:00Z", +value = 1672725, +}, +new +{ +timestamp = "2017-01-01T08:30:00Z", +value = 1673247, +}, +new +{ +timestamp = "2017-01-01T08:35:00Z", +value = 1673109, +}, +new +{ +timestamp = "2017-01-01T08:40:00Z", +value = 1690088, +}, +new +{ +timestamp = "2017-01-01T08:45:00Z", +value = 1703865, +}, +new +{ +timestamp = "2017-01-01T08:50:00Z", +value = 1703865, +}, +new +{ +timestamp = "2017-01-01T08:55:00Z", +value = 1786581, +}, +new +{ +timestamp = "2017-01-01T09:00:00Z", +value = 1800945, +}, +new +{ +timestamp = "2017-01-01T09:05:00Z", +value = 1800957, +}, +new +{ +timestamp = "2017-01-01T09:10:00Z", +value = 1801191, +}, +new +{ +timestamp = "2017-01-01T09:15:00Z", +value = 1801412, +}, +new +{ +timestamp = "2017-01-01T09:20:00Z", +value = 1801621, +}, +new +{ +timestamp = "2017-01-01T09:25:00Z", +value = 1801621, +}, +new +{ +timestamp = "2017-01-01T09:30:00Z", +value = 1801654, +}, +new +{ +timestamp = "2017-01-01T09:35:00Z", +value = 1802105, +}, +new +{ +timestamp = "2017-01-01T09:40:00Z", +value = 1801800, +}, +new +{ +timestamp = "2017-01-01T09:45:00Z", +value = 1803040, +}, +new +{ +timestamp = "2017-01-01T09:50:00Z", +value = 1803672, +}, +new +{ +timestamp = "2017-01-01T09:55:00Z", +value = 1803535, +}, +new +{ +timestamp = "2017-01-01T10:00:00Z", +value = 1803541, +}, +new +{ +timestamp = "2017-01-01T10:05:00Z", +value = 1803545, +}, +new +{ +timestamp = "2017-01-01T10:10:00Z", +value = 1803599, +}, +new +{ +timestamp = "2017-01-01T10:15:00Z", +value = 1803616, +}, +new +{ +timestamp = "2017-01-01T10:20:00Z", +value = 1803619, +}, +new +{ +timestamp = "2017-01-01T10:25:00Z", +value = 1809942, +}, +new +{ +timestamp = "2017-01-01T10:30:00Z", +value = 1802720, +}, +new +{ +timestamp = "2017-01-01T10:35:00Z", +value = 1802720, +}, +new +{ +timestamp = "2017-01-01T10:40:00Z", +value = 1802888, +}, +new +{ +timestamp = "2017-01-01T10:45:00Z", +value = 1809574, +}, +new +{ +timestamp = "2017-01-01T10:50:00Z", +value = 1803896, +}, +new +{ +timestamp = "2017-01-01T10:55:00Z", +value = 1803850, +}, +new +{ +timestamp = "2017-01-01T11:00:00Z", +value = 1803854, +}, +new +{ +timestamp = "2017-01-01T11:05:00Z", +value = 1803854, +}, +new +{ +timestamp = "2017-01-01T11:10:00Z", +value = 1803797, +}, +new +{ +timestamp = "2017-01-01T11:15:00Z", +value = 1803921, +}, +new +{ +timestamp = "2017-01-01T11:20:00Z", +value = 1803933, +}, +new +{ +timestamp = "2017-01-01T11:25:00Z", +value = 1804040, +}, +new +{ +timestamp = "2017-01-01T11:30:00Z", +value = 1804044, +}, +new +{ +timestamp = "2017-01-01T11:35:00Z", +value = 1804070, +}, +new +{ +timestamp = "2017-01-01T11:40:00Z", +value = 1804070, +}, +new +{ +timestamp = "2017-01-01T11:45:00Z", +value = 1804068, +}, +new +{ +timestamp = "2017-01-01T11:50:00Z", +value = 1804073, +}, +new +{ +timestamp = "2017-01-01T11:55:00Z", +value = 1804101, +}, +new +{ +timestamp = "2017-01-01T12:00:00Z", +value = 1804674, +}, +new +{ +timestamp = "2017-01-01T12:05:00Z", +value = 1804714, +}, +new +{ +timestamp = "2017-01-01T12:10:00Z", +value = 1804730, +}, +new +{ +timestamp = "2017-01-01T12:15:00Z", +value = 1804816, +}, +new +{ +timestamp = "2017-01-01T12:20:00Z", +value = 1803996, +}, +new +{ +timestamp = "2017-01-01T12:25:00Z", +value = 1803998, +}, +new +{ +timestamp = "2017-01-01T12:30:00Z", +value = 1804015, +}, +new +{ +timestamp = "2017-01-01T12:35:00Z", +value = 1804047, +}, +new +{ +timestamp = "2017-01-01T12:40:00Z", +value = 1804050, +}, +new +{ +timestamp = "2017-01-01T12:45:00Z", +value = 1804218, +}, +new +{ +timestamp = "2017-01-01T12:50:00Z", +value = 1804217, +}, +new +{ +timestamp = "2017-01-01T12:55:00Z", +value = 1804217, +}, +new +{ +timestamp = "2017-01-01T13:00:00Z", +value = 1804205, +}, +new +{ +timestamp = "2017-01-01T13:05:00Z", +value = 1804728, +}, +new +{ +timestamp = "2017-01-01T13:10:00Z", +value = 1804748, +}, +new +{ +timestamp = "2017-01-01T13:15:00Z", +value = 1805232, +}, +new +{ +timestamp = "2017-01-01T13:20:00Z", +value = 1814121, +}, +new +{ +timestamp = "2017-01-01T13:25:00Z", +value = 1806789, +}, +new +{ +timestamp = "2017-01-01T13:30:00Z", +value = 1806119, +}, +new +{ +timestamp = "2017-01-01T13:35:00Z", +value = 1806329, +}, +new +{ +timestamp = "2017-01-01T13:40:00Z", +value = 1806454, +}, +new +{ +timestamp = "2017-01-01T13:45:00Z", +value = 1806852, +}, +new +{ +timestamp = "2017-01-01T13:50:00Z", +value = 1807347, +}, +new +{ +timestamp = "2017-01-01T13:55:00Z", +value = 1812144, +}, +new +{ +timestamp = "2017-01-01T14:00:00Z", +value = 1807418, +}, +new +{ +timestamp = "2017-01-01T14:05:00Z", +value = 1807418, +}, +new +{ +timestamp = "2017-01-01T14:10:00Z", +value = 1807432, +}, +new +{ +timestamp = "2017-01-01T14:15:00Z", +value = 1808540, +}, +new +{ +timestamp = "2017-01-01T14:20:00Z", +value = 1808541, +}, +new +{ +timestamp = "2017-01-01T14:25:00Z", +value = 1807831, +}, +new +{ +timestamp = "2017-01-01T14:30:00Z", +value = 1807852, +}, +new +{ +timestamp = "2017-01-01T14:35:00Z", +value = 1807811, +}, +new +{ +timestamp = "2017-01-01T14:40:00Z", +value = 2214285, +}, +new +{ +timestamp = "2017-01-01T14:45:00Z", +value = 2215019, +}, +new +{ +timestamp = "2017-01-01T14:50:00Z", +value = 2215329, +}, +new +{ +timestamp = "2017-01-01T14:55:00Z", +value = 2215097, +}, +new +{ +timestamp = "2017-01-01T15:00:00Z", +value = 2215129, +}, +new +{ +timestamp = "2017-01-01T15:05:00Z", +value = 2215120, +}, +new +{ +timestamp = "2017-01-01T15:10:00Z", +value = 2217056, +}, +new +{ +timestamp = "2017-01-01T15:15:00Z", +value = 2217056, +}, +new +{ +timestamp = "2017-01-01T15:20:00Z", +value = 2222126, +}, +new +{ +timestamp = "2017-01-01T15:25:00Z", +value = 2226472, +}, +new +{ +timestamp = "2017-01-01T15:30:00Z", +value = 2226722, +}, +new +{ +timestamp = "2017-01-01T15:35:00Z", +value = 2226729, +}, +new +{ +timestamp = "2017-01-01T15:40:00Z", +value = 2226735, +}, +new +{ +timestamp = "2017-01-01T15:45:00Z", +value = 2226735, +}, +new +{ +timestamp = "2017-01-01T15:50:00Z", +value = 2226735, +}, +new +{ +timestamp = "2017-01-01T15:55:00Z", +value = 2226952, +}, +new +{ +timestamp = "2017-01-01T16:00:00Z", +value = 2226962, +}, +new +{ +timestamp = "2017-01-01T16:05:00Z", +value = 2649337, +}, +new +{ +timestamp = "2017-01-01T16:10:00Z", +value = 2092796, +}, +new +{ +timestamp = "2017-01-01T16:15:00Z", +value = 2092839, +}, +new +{ +timestamp = "2017-01-01T16:20:00Z", +value = 2092940, +}, +new +{ +timestamp = "2017-01-01T16:25:00Z", +value = 2092940, +}, +new +{ +timestamp = "2017-01-01T16:30:00Z", +value = 2092965, +}, +new +{ +timestamp = "2017-01-01T16:35:00Z", +value = 2092979, +}, +new +{ +timestamp = "2017-01-01T16:40:00Z", +value = 2095588, +}, +new +{ +timestamp = "2017-01-01T16:45:00Z", +value = 2099586, +}, +new +{ +timestamp = "2017-01-01T16:50:00Z", +value = 2102981, +}, +new +{ +timestamp = "2017-01-01T16:55:00Z", +value = 2108053, +}, +new +{ +timestamp = "2017-01-01T17:00:00Z", +value = 2107907, +}, +new +{ +timestamp = "2017-01-01T17:05:00Z", +value = 2108241, +}, +new +{ +timestamp = "2017-01-01T17:10:00Z", +value = 2100321, +}, +new +{ +timestamp = "2017-01-01T17:15:00Z", +value = 2100448, +}, +new +{ +timestamp = "2017-01-01T17:20:00Z", +value = 2100483, +}, +new +{ +timestamp = "2017-01-01T17:25:00Z", +value = 2103042, +}, +new +{ +timestamp = "2017-01-01T17:30:00Z", +value = 2103037, +}, +new +{ +timestamp = "2017-01-01T17:35:00Z", +value = 2103040, +}, +new +{ +timestamp = "2017-01-01T17:40:00Z", +value = 2103054, +}, +new +{ +timestamp = "2017-01-01T17:45:00Z", +value = 2103058, +}, +new +{ +timestamp = "2017-01-01T17:50:00Z", +value = 1830757, +}, +new +{ +timestamp = "2017-01-01T17:55:00Z", +value = 1830855, +}, +new +{ +timestamp = "2017-01-01T18:00:00Z", +value = 1831495, +}, +new +{ +timestamp = "2017-01-01T18:05:00Z", +value = 1831463, +}, +new +{ +timestamp = "2017-01-01T18:10:00Z", +value = 1831963, +}, +new +{ +timestamp = "2017-01-01T18:15:00Z", +value = 1832046, +}, +new +{ +timestamp = "2017-01-01T18:20:00Z", +value = 1832070, +}, +new +{ +timestamp = "2017-01-01T18:25:00Z", +value = 1835511, +}, +new +{ +timestamp = "2017-01-01T18:30:00Z", +value = 1835265, +}, +new +{ +timestamp = "2017-01-01T18:35:00Z", +value = 1835481, +}, +new +{ +timestamp = "2017-01-01T18:40:00Z", +value = 1835578, +}, +new +{ +timestamp = "2017-01-01T18:45:00Z", +value = 1835611, +}, +new +{ +timestamp = "2017-01-01T18:50:00Z", +value = 1836314, +}, +new +{ +timestamp = "2017-01-01T18:55:00Z", +value = 1836369, +}, +new +{ +timestamp = "2017-01-01T19:00:00Z", +value = 1837280, +}, +new +{ +timestamp = "2017-01-01T19:05:00Z", +value = 1842939, +}, +new +{ +timestamp = "2017-01-01T19:10:00Z", +value = 1843126, +}, +new +{ +timestamp = "2017-01-01T19:15:00Z", +value = 1845840, +}, +new +{ +timestamp = "2017-01-01T19:20:00Z", +value = 1842444, +}, +new +{ +timestamp = "2017-01-01T19:25:00Z", +value = 1839891, +}, +new +{ +timestamp = "2017-01-01T19:30:00Z", +value = 1839875, +}, +new +{ +timestamp = "2017-01-01T19:35:00Z", +value = 1839870, +}, +new +{ +timestamp = "2017-01-01T19:40:00Z", +value = 1840090, +}, +new +{ +timestamp = "2017-01-01T19:45:00Z", +value = 1840479, +}, +new +{ +timestamp = "2017-01-01T19:50:00Z", +value = 1840479, +}, +new +{ +timestamp = "2017-01-01T19:55:00Z", +value = 1840482, +}, +new +{ +timestamp = "2017-01-01T20:00:00Z", +value = 1841522, +}, +new +{ +timestamp = "2017-01-01T20:05:00Z", +value = 1841836, +}, +new +{ +timestamp = "2017-01-01T20:10:00Z", +value = 1842377, +}, +new +{ +timestamp = "2017-01-01T20:15:00Z", +value = 1842388, +}, +new +{ +timestamp = "2017-01-01T20:20:00Z", +value = 1842489, +}, +new +{ +timestamp = "2017-01-01T20:25:00Z", +value = 1842489, +}, +new +{ +timestamp = "2017-01-01T20:30:00Z", +value = 1842489, +}, +new +{ +timestamp = "2017-01-01T20:35:00Z", +value = 1842496, +}, +new +{ +timestamp = "2017-01-01T20:40:00Z", +value = 1842689, +}, +new +{ +timestamp = "2017-01-01T20:45:00Z", +value = 1843117, +}, +new +{ +timestamp = "2017-01-01T20:50:00Z", +value = 1843116, +}, +new +{ +timestamp = "2017-01-01T20:55:00Z", +value = 1843227, +}, +new +{ +timestamp = "2017-01-01T21:00:00Z", +value = 1843138, +}, +new +{ +timestamp = "2017-01-01T21:05:00Z", +value = 1843141, +}, +new +{ +timestamp = "2017-01-01T21:10:00Z", +value = 1843310, +}, +new +{ +timestamp = "2017-01-01T21:15:00Z", +value = 1843310, +}, +new +{ +timestamp = "2017-01-01T21:20:00Z", +value = 1843507, +}, +new +{ +timestamp = "2017-01-01T21:25:00Z", +value = 1843953, +}, +new +{ +timestamp = "2017-01-01T21:30:00Z", +value = 1844778, +}, +new +{ +timestamp = "2017-01-01T21:35:00Z", +value = 1843918, +}, +new +{ +timestamp = "2017-01-01T21:40:00Z", +value = 1882692, +}, +new +{ +timestamp = "2017-01-01T21:45:00Z", +value = 1974888, +}, +new +{ +timestamp = "2017-01-01T21:50:00Z", +value = 2157136, +}, +new +{ +timestamp = "2017-01-01T21:55:00Z", +value = 2154987, +}, +new +{ +timestamp = "2017-01-01T22:00:00Z", +value = 2155664, +}, +new +{ +timestamp = "2017-01-01T22:05:00Z", +value = 2155660, +}, +new +{ +timestamp = "2017-01-01T22:10:00Z", +value = 2155824, +}, +new +{ +timestamp = "2017-01-01T22:15:00Z", +value = 2155824, +}, +new +{ +timestamp = "2017-01-01T22:20:00Z", +value = 2156329, +}, +new +{ +timestamp = "2017-01-01T22:25:00Z", +value = 2156479, +}, +new +{ +timestamp = "2017-01-01T22:30:00Z", +value = 2165269, +}, +new +{ +timestamp = "2017-01-01T22:35:00Z", +value = 2165433, +}, +new +{ +timestamp = "2017-01-01T22:40:00Z", +value = 2165739, +}, +new +{ +timestamp = "2017-01-01T22:45:00Z", +value = 2165931, +}, +new +{ +timestamp = "2017-01-01T22:50:00Z", +value = 2165928, +}, +new +{ +timestamp = "2017-01-01T22:55:00Z", +value = 2165989, +}, +new +{ +timestamp = "2017-01-01T23:00:00Z", +value = 2228961, +}, +new +{ +timestamp = "2017-01-01T23:05:00Z", +value = 2228961, +}, +new +{ +timestamp = "2017-01-01T23:10:00Z", +value = 2228961, +}, +new +{ +timestamp = "2017-01-01T23:15:00Z", +value = 2485802, +}, +new +{ +timestamp = "2017-01-01T23:20:00Z", +value = 2485802, +}, +new +{ +timestamp = "2017-01-01T23:25:00Z", +value = 2486021, +}, +new +{ +timestamp = "2017-01-01T23:30:00Z", +value = 2485293, +}, +new +{ +timestamp = "2017-01-01T23:35:00Z", +value = 2485293, +}, +new +{ +timestamp = "2017-01-01T23:40:00Z", +value = 2485324, +}, +new +{ +timestamp = "2017-01-01T23:45:00Z", +value = 2489142, +}, +new +{ +timestamp = "2017-01-01T23:50:00Z", +value = 2526312, +}, +new +{ +timestamp = "2017-01-01T23:55:00Z", +value = 2526313, +}, +new +{ +timestamp = "2017-01-02T00:00:00Z", +value = 2526314, +}, +new +{ +timestamp = "2017-01-02T00:05:00Z", +value = 2526324, +}, +new +{ +timestamp = "2017-01-02T00:10:00Z", +value = 2526325, +}, +new +{ +timestamp = "2017-01-02T00:15:00Z", +value = 2526205, +}, +new +{ +timestamp = "2017-01-02T00:20:00Z", +value = 2526226, +}, +new +{ +timestamp = "2017-01-02T00:25:00Z", +value = 2526475, +}, +new +{ +timestamp = "2017-01-02T00:30:00Z", +value = 2526471, +}, +new +{ +timestamp = "2017-01-02T00:35:00Z", +value = 2526471, +}, +new +{ +timestamp = "2017-01-02T00:40:00Z", +value = 2526534, +}, +new +{ +timestamp = "2017-01-02T00:45:00Z", +value = 2526646, +}, +new +{ +timestamp = "2017-01-02T00:50:00Z", +value = 2526646, +}, +new +{ +timestamp = "2017-01-02T00:55:00Z", +value = 2526648, +}, +new +{ +timestamp = "2017-01-02T01:00:00Z", +value = 2526658, +}, +new +{ +timestamp = "2017-01-02T01:05:00Z", +value = 2526771, +}, +new +{ +timestamp = "2017-01-02T01:10:00Z", +value = 2526773, +}, +new +{ +timestamp = "2017-01-02T01:15:00Z", +value = 2526793, +}, +new +{ +timestamp = "2017-01-02T01:20:00Z", +value = 2527010, +}, +new +{ +timestamp = "2017-01-02T01:25:00Z", +value = 2527031, +}, +new +{ +timestamp = "2017-01-02T01:30:00Z", +value = 3178096, +}, +new +{ +timestamp = "2017-01-02T01:35:00Z", +value = 3196305, +}, +new +{ +timestamp = "2017-01-02T01:40:00Z", +value = 3196202, +}, +new +{ +timestamp = "2017-01-02T01:45:00Z", +value = 3196202, +}, +new +{ +timestamp = "2017-01-02T01:50:00Z", +value = 3196205, +}, +new +{ +timestamp = "2017-01-02T01:55:00Z", +value = 3229232, +}, +new +{ +timestamp = "2017-01-02T02:00:00Z", +value = 3230463, +}, +new +{ +timestamp = "2017-01-02T02:05:00Z", +value = 3230468, +}, +new +{ +timestamp = "2017-01-02T02:10:00Z", +value = 3230468, +}, +new +{ +timestamp = "2017-01-02T02:15:00Z", +value = 3230468, +}, +new +{ +timestamp = "2017-01-02T02:20:00Z", +value = 3230470, +}, +new +{ +timestamp = "2017-01-02T02:25:00Z", +value = 3230467, +}, +new +{ +timestamp = "2017-01-02T02:30:00Z", +value = 3230506, +}, +new +{ +timestamp = "2017-01-02T02:35:00Z", +value = 3231536, +}, +new +{ +timestamp = "2017-01-02T02:40:00Z", +value = 3230723, +}, +new +{ +timestamp = "2017-01-02T02:45:00Z", +value = 3230727, +}, +new +{ +timestamp = "2017-01-02T02:50:00Z", +value = 3230727, +}, +new +{ +timestamp = "2017-01-02T02:55:00Z", +value = 3230727, +}, +new +{ +timestamp = "2017-01-02T03:00:00Z", +value = 3231880, +}, +new +{ +timestamp = "2017-01-02T03:05:00Z", +value = 3232283, +}, +new +{ +timestamp = "2017-01-02T03:10:00Z", +value = 3232283, +}, +new +{ +timestamp = "2017-01-02T03:15:00Z", +value = 3232283, +}, +new +{ +timestamp = "2017-01-02T03:20:00Z", +value = 3232325, +}, +new +{ +timestamp = "2017-01-02T03:25:00Z", +value = 3232323, +}, +new +{ +timestamp = "2017-01-02T03:30:00Z", +value = 3232327, +}, +new +{ +timestamp = "2017-01-02T03:35:00Z", +value = 3232340, +}, +new +{ +timestamp = "2017-01-02T03:40:00Z", +value = 3232713, +}, +new +{ +timestamp = "2017-01-02T03:45:00Z", +value = 3232729, +}, +new +{ +timestamp = "2017-01-02T03:50:00Z", +value = 3232756, +}, +new +{ +timestamp = "2017-01-02T03:55:00Z", +value = 3233500, +}, +new +{ +timestamp = "2017-01-02T04:00:00Z", +value = 3233500, +}, +new +{ +timestamp = "2017-01-02T04:05:00Z", +value = 3233500, +} + }, + granularity = "minutely", + customInterval = 5, + stableTrendWindow = 10, + threshold = 0.99, + period = 0, + }); + Response response = client.DetectUnivariateChangePoint(content); - UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[] - { -new TimeSeriesPoint(123.45F) - }, TimeGranularity.Yearly); - Response response = await client.DetectUnivariateChangePointAsync(options); + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Univariate_DetectUnivariateChangePoint_AllParameters() + public async Task Example_Univariate_DetectUnivariateChangePoint_UnivariateDetectionOfAChangePoint_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); @@ -560,100 +3276,3394 @@ public void Example_Univariate_DetectUnivariateChangePoint_AllParameters() { new { -timestamp = "2022-05-10T18:57:31.2311892Z", -value = 123.45F, -} - }, - granularity = "yearly", - customInterval = 1234, - period = 1234, - stableTrendWindow = 1234, - threshold = 123.45F, - }); - Response response = client.DetectUnivariateChangePoint(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("period").ToString()); - Console.WriteLine(result.GetProperty("isChangePoint")[0].ToString()); - Console.WriteLine(result.GetProperty("confidenceScores")[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_Univariate_DetectUnivariateChangePoint_AllParameters_Async() - { - Uri endpoint = new Uri(""); - AzureKeyCredential credential = new AzureKeyCredential(""); - Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); - - using RequestContent content = RequestContent.Create(new - { - series = new object[] - { +timestamp = "2017-01-01T06:45:00Z", +value = 1639196, +}, +new +{ +timestamp = "2017-01-01T06:50:00Z", +value = 1639290, +}, +new +{ +timestamp = "2017-01-01T06:55:00Z", +value = 1667293, +}, +new +{ +timestamp = "2017-01-01T07:00:00Z", +value = 1703130, +}, +new +{ +timestamp = "2017-01-01T07:05:00Z", +value = 1650912, +}, +new +{ +timestamp = "2017-01-01T07:10:00Z", +value = 1653596, +}, +new +{ +timestamp = "2017-01-01T07:15:00Z", +value = 1653793, +}, +new +{ +timestamp = "2017-01-01T07:20:00Z", +value = 1653795, +}, +new +{ +timestamp = "2017-01-01T07:25:00Z", +value = 1663471, +}, +new +{ +timestamp = "2017-01-01T07:30:00Z", +value = 1662358, +}, +new +{ +timestamp = "2017-01-01T07:35:00Z", +value = 1664320, +}, +new +{ +timestamp = "2017-01-01T07:40:00Z", +value = 1664942, +}, +new +{ +timestamp = "2017-01-01T07:45:00Z", +value = 1664966, +}, +new +{ +timestamp = "2017-01-01T07:50:00Z", +value = 1724271, +}, +new +{ +timestamp = "2017-01-01T07:55:00Z", +value = 1678720, +}, +new +{ +timestamp = "2017-01-01T08:00:00Z", +value = 1672536, +}, +new +{ +timestamp = "2017-01-01T08:05:00Z", +value = 1672544, +}, +new +{ +timestamp = "2017-01-01T08:10:00Z", +value = 1672364, +}, +new +{ +timestamp = "2017-01-01T08:15:00Z", +value = 1672912, +}, +new +{ +timestamp = "2017-01-01T08:20:00Z", +value = 1672736, +}, +new +{ +timestamp = "2017-01-01T08:25:00Z", +value = 1672725, +}, +new +{ +timestamp = "2017-01-01T08:30:00Z", +value = 1673247, +}, +new +{ +timestamp = "2017-01-01T08:35:00Z", +value = 1673109, +}, +new +{ +timestamp = "2017-01-01T08:40:00Z", +value = 1690088, +}, +new +{ +timestamp = "2017-01-01T08:45:00Z", +value = 1703865, +}, +new +{ +timestamp = "2017-01-01T08:50:00Z", +value = 1703865, +}, +new +{ +timestamp = "2017-01-01T08:55:00Z", +value = 1786581, +}, +new +{ +timestamp = "2017-01-01T09:00:00Z", +value = 1800945, +}, +new +{ +timestamp = "2017-01-01T09:05:00Z", +value = 1800957, +}, +new +{ +timestamp = "2017-01-01T09:10:00Z", +value = 1801191, +}, +new +{ +timestamp = "2017-01-01T09:15:00Z", +value = 1801412, +}, +new +{ +timestamp = "2017-01-01T09:20:00Z", +value = 1801621, +}, +new +{ +timestamp = "2017-01-01T09:25:00Z", +value = 1801621, +}, +new +{ +timestamp = "2017-01-01T09:30:00Z", +value = 1801654, +}, +new +{ +timestamp = "2017-01-01T09:35:00Z", +value = 1802105, +}, +new +{ +timestamp = "2017-01-01T09:40:00Z", +value = 1801800, +}, +new +{ +timestamp = "2017-01-01T09:45:00Z", +value = 1803040, +}, +new +{ +timestamp = "2017-01-01T09:50:00Z", +value = 1803672, +}, +new +{ +timestamp = "2017-01-01T09:55:00Z", +value = 1803535, +}, +new +{ +timestamp = "2017-01-01T10:00:00Z", +value = 1803541, +}, +new +{ +timestamp = "2017-01-01T10:05:00Z", +value = 1803545, +}, +new +{ +timestamp = "2017-01-01T10:10:00Z", +value = 1803599, +}, +new +{ +timestamp = "2017-01-01T10:15:00Z", +value = 1803616, +}, +new +{ +timestamp = "2017-01-01T10:20:00Z", +value = 1803619, +}, +new +{ +timestamp = "2017-01-01T10:25:00Z", +value = 1809942, +}, +new +{ +timestamp = "2017-01-01T10:30:00Z", +value = 1802720, +}, +new +{ +timestamp = "2017-01-01T10:35:00Z", +value = 1802720, +}, +new +{ +timestamp = "2017-01-01T10:40:00Z", +value = 1802888, +}, +new +{ +timestamp = "2017-01-01T10:45:00Z", +value = 1809574, +}, +new +{ +timestamp = "2017-01-01T10:50:00Z", +value = 1803896, +}, +new +{ +timestamp = "2017-01-01T10:55:00Z", +value = 1803850, +}, +new +{ +timestamp = "2017-01-01T11:00:00Z", +value = 1803854, +}, +new +{ +timestamp = "2017-01-01T11:05:00Z", +value = 1803854, +}, +new +{ +timestamp = "2017-01-01T11:10:00Z", +value = 1803797, +}, +new +{ +timestamp = "2017-01-01T11:15:00Z", +value = 1803921, +}, +new +{ +timestamp = "2017-01-01T11:20:00Z", +value = 1803933, +}, +new +{ +timestamp = "2017-01-01T11:25:00Z", +value = 1804040, +}, +new +{ +timestamp = "2017-01-01T11:30:00Z", +value = 1804044, +}, +new +{ +timestamp = "2017-01-01T11:35:00Z", +value = 1804070, +}, +new +{ +timestamp = "2017-01-01T11:40:00Z", +value = 1804070, +}, +new +{ +timestamp = "2017-01-01T11:45:00Z", +value = 1804068, +}, +new +{ +timestamp = "2017-01-01T11:50:00Z", +value = 1804073, +}, +new +{ +timestamp = "2017-01-01T11:55:00Z", +value = 1804101, +}, +new +{ +timestamp = "2017-01-01T12:00:00Z", +value = 1804674, +}, +new +{ +timestamp = "2017-01-01T12:05:00Z", +value = 1804714, +}, +new +{ +timestamp = "2017-01-01T12:10:00Z", +value = 1804730, +}, +new +{ +timestamp = "2017-01-01T12:15:00Z", +value = 1804816, +}, +new +{ +timestamp = "2017-01-01T12:20:00Z", +value = 1803996, +}, +new +{ +timestamp = "2017-01-01T12:25:00Z", +value = 1803998, +}, +new +{ +timestamp = "2017-01-01T12:30:00Z", +value = 1804015, +}, +new +{ +timestamp = "2017-01-01T12:35:00Z", +value = 1804047, +}, +new +{ +timestamp = "2017-01-01T12:40:00Z", +value = 1804050, +}, +new +{ +timestamp = "2017-01-01T12:45:00Z", +value = 1804218, +}, +new +{ +timestamp = "2017-01-01T12:50:00Z", +value = 1804217, +}, +new +{ +timestamp = "2017-01-01T12:55:00Z", +value = 1804217, +}, +new +{ +timestamp = "2017-01-01T13:00:00Z", +value = 1804205, +}, +new +{ +timestamp = "2017-01-01T13:05:00Z", +value = 1804728, +}, +new +{ +timestamp = "2017-01-01T13:10:00Z", +value = 1804748, +}, +new +{ +timestamp = "2017-01-01T13:15:00Z", +value = 1805232, +}, +new +{ +timestamp = "2017-01-01T13:20:00Z", +value = 1814121, +}, +new +{ +timestamp = "2017-01-01T13:25:00Z", +value = 1806789, +}, +new +{ +timestamp = "2017-01-01T13:30:00Z", +value = 1806119, +}, +new +{ +timestamp = "2017-01-01T13:35:00Z", +value = 1806329, +}, +new +{ +timestamp = "2017-01-01T13:40:00Z", +value = 1806454, +}, +new +{ +timestamp = "2017-01-01T13:45:00Z", +value = 1806852, +}, +new +{ +timestamp = "2017-01-01T13:50:00Z", +value = 1807347, +}, +new +{ +timestamp = "2017-01-01T13:55:00Z", +value = 1812144, +}, +new +{ +timestamp = "2017-01-01T14:00:00Z", +value = 1807418, +}, +new +{ +timestamp = "2017-01-01T14:05:00Z", +value = 1807418, +}, +new +{ +timestamp = "2017-01-01T14:10:00Z", +value = 1807432, +}, +new +{ +timestamp = "2017-01-01T14:15:00Z", +value = 1808540, +}, +new +{ +timestamp = "2017-01-01T14:20:00Z", +value = 1808541, +}, +new +{ +timestamp = "2017-01-01T14:25:00Z", +value = 1807831, +}, +new +{ +timestamp = "2017-01-01T14:30:00Z", +value = 1807852, +}, +new +{ +timestamp = "2017-01-01T14:35:00Z", +value = 1807811, +}, +new +{ +timestamp = "2017-01-01T14:40:00Z", +value = 2214285, +}, +new +{ +timestamp = "2017-01-01T14:45:00Z", +value = 2215019, +}, +new +{ +timestamp = "2017-01-01T14:50:00Z", +value = 2215329, +}, +new +{ +timestamp = "2017-01-01T14:55:00Z", +value = 2215097, +}, +new +{ +timestamp = "2017-01-01T15:00:00Z", +value = 2215129, +}, +new +{ +timestamp = "2017-01-01T15:05:00Z", +value = 2215120, +}, +new +{ +timestamp = "2017-01-01T15:10:00Z", +value = 2217056, +}, +new +{ +timestamp = "2017-01-01T15:15:00Z", +value = 2217056, +}, +new +{ +timestamp = "2017-01-01T15:20:00Z", +value = 2222126, +}, +new +{ +timestamp = "2017-01-01T15:25:00Z", +value = 2226472, +}, +new +{ +timestamp = "2017-01-01T15:30:00Z", +value = 2226722, +}, +new +{ +timestamp = "2017-01-01T15:35:00Z", +value = 2226729, +}, +new +{ +timestamp = "2017-01-01T15:40:00Z", +value = 2226735, +}, +new +{ +timestamp = "2017-01-01T15:45:00Z", +value = 2226735, +}, +new +{ +timestamp = "2017-01-01T15:50:00Z", +value = 2226735, +}, +new +{ +timestamp = "2017-01-01T15:55:00Z", +value = 2226952, +}, +new +{ +timestamp = "2017-01-01T16:00:00Z", +value = 2226962, +}, +new +{ +timestamp = "2017-01-01T16:05:00Z", +value = 2649337, +}, +new +{ +timestamp = "2017-01-01T16:10:00Z", +value = 2092796, +}, +new +{ +timestamp = "2017-01-01T16:15:00Z", +value = 2092839, +}, +new +{ +timestamp = "2017-01-01T16:20:00Z", +value = 2092940, +}, +new +{ +timestamp = "2017-01-01T16:25:00Z", +value = 2092940, +}, +new +{ +timestamp = "2017-01-01T16:30:00Z", +value = 2092965, +}, +new +{ +timestamp = "2017-01-01T16:35:00Z", +value = 2092979, +}, +new +{ +timestamp = "2017-01-01T16:40:00Z", +value = 2095588, +}, +new +{ +timestamp = "2017-01-01T16:45:00Z", +value = 2099586, +}, +new +{ +timestamp = "2017-01-01T16:50:00Z", +value = 2102981, +}, +new +{ +timestamp = "2017-01-01T16:55:00Z", +value = 2108053, +}, +new +{ +timestamp = "2017-01-01T17:00:00Z", +value = 2107907, +}, +new +{ +timestamp = "2017-01-01T17:05:00Z", +value = 2108241, +}, +new +{ +timestamp = "2017-01-01T17:10:00Z", +value = 2100321, +}, +new +{ +timestamp = "2017-01-01T17:15:00Z", +value = 2100448, +}, +new +{ +timestamp = "2017-01-01T17:20:00Z", +value = 2100483, +}, +new +{ +timestamp = "2017-01-01T17:25:00Z", +value = 2103042, +}, +new +{ +timestamp = "2017-01-01T17:30:00Z", +value = 2103037, +}, +new +{ +timestamp = "2017-01-01T17:35:00Z", +value = 2103040, +}, +new +{ +timestamp = "2017-01-01T17:40:00Z", +value = 2103054, +}, +new +{ +timestamp = "2017-01-01T17:45:00Z", +value = 2103058, +}, +new +{ +timestamp = "2017-01-01T17:50:00Z", +value = 1830757, +}, +new +{ +timestamp = "2017-01-01T17:55:00Z", +value = 1830855, +}, +new +{ +timestamp = "2017-01-01T18:00:00Z", +value = 1831495, +}, +new +{ +timestamp = "2017-01-01T18:05:00Z", +value = 1831463, +}, +new +{ +timestamp = "2017-01-01T18:10:00Z", +value = 1831963, +}, +new +{ +timestamp = "2017-01-01T18:15:00Z", +value = 1832046, +}, +new +{ +timestamp = "2017-01-01T18:20:00Z", +value = 1832070, +}, +new +{ +timestamp = "2017-01-01T18:25:00Z", +value = 1835511, +}, +new +{ +timestamp = "2017-01-01T18:30:00Z", +value = 1835265, +}, +new +{ +timestamp = "2017-01-01T18:35:00Z", +value = 1835481, +}, +new +{ +timestamp = "2017-01-01T18:40:00Z", +value = 1835578, +}, +new +{ +timestamp = "2017-01-01T18:45:00Z", +value = 1835611, +}, +new +{ +timestamp = "2017-01-01T18:50:00Z", +value = 1836314, +}, +new +{ +timestamp = "2017-01-01T18:55:00Z", +value = 1836369, +}, +new +{ +timestamp = "2017-01-01T19:00:00Z", +value = 1837280, +}, +new +{ +timestamp = "2017-01-01T19:05:00Z", +value = 1842939, +}, +new +{ +timestamp = "2017-01-01T19:10:00Z", +value = 1843126, +}, +new +{ +timestamp = "2017-01-01T19:15:00Z", +value = 1845840, +}, +new +{ +timestamp = "2017-01-01T19:20:00Z", +value = 1842444, +}, +new +{ +timestamp = "2017-01-01T19:25:00Z", +value = 1839891, +}, +new +{ +timestamp = "2017-01-01T19:30:00Z", +value = 1839875, +}, +new +{ +timestamp = "2017-01-01T19:35:00Z", +value = 1839870, +}, +new +{ +timestamp = "2017-01-01T19:40:00Z", +value = 1840090, +}, +new +{ +timestamp = "2017-01-01T19:45:00Z", +value = 1840479, +}, +new +{ +timestamp = "2017-01-01T19:50:00Z", +value = 1840479, +}, +new +{ +timestamp = "2017-01-01T19:55:00Z", +value = 1840482, +}, +new +{ +timestamp = "2017-01-01T20:00:00Z", +value = 1841522, +}, +new +{ +timestamp = "2017-01-01T20:05:00Z", +value = 1841836, +}, +new +{ +timestamp = "2017-01-01T20:10:00Z", +value = 1842377, +}, +new +{ +timestamp = "2017-01-01T20:15:00Z", +value = 1842388, +}, +new +{ +timestamp = "2017-01-01T20:20:00Z", +value = 1842489, +}, +new +{ +timestamp = "2017-01-01T20:25:00Z", +value = 1842489, +}, +new +{ +timestamp = "2017-01-01T20:30:00Z", +value = 1842489, +}, +new +{ +timestamp = "2017-01-01T20:35:00Z", +value = 1842496, +}, +new +{ +timestamp = "2017-01-01T20:40:00Z", +value = 1842689, +}, +new +{ +timestamp = "2017-01-01T20:45:00Z", +value = 1843117, +}, +new +{ +timestamp = "2017-01-01T20:50:00Z", +value = 1843116, +}, +new +{ +timestamp = "2017-01-01T20:55:00Z", +value = 1843227, +}, +new +{ +timestamp = "2017-01-01T21:00:00Z", +value = 1843138, +}, +new +{ +timestamp = "2017-01-01T21:05:00Z", +value = 1843141, +}, +new +{ +timestamp = "2017-01-01T21:10:00Z", +value = 1843310, +}, +new +{ +timestamp = "2017-01-01T21:15:00Z", +value = 1843310, +}, +new +{ +timestamp = "2017-01-01T21:20:00Z", +value = 1843507, +}, +new +{ +timestamp = "2017-01-01T21:25:00Z", +value = 1843953, +}, +new +{ +timestamp = "2017-01-01T21:30:00Z", +value = 1844778, +}, +new +{ +timestamp = "2017-01-01T21:35:00Z", +value = 1843918, +}, +new +{ +timestamp = "2017-01-01T21:40:00Z", +value = 1882692, +}, +new +{ +timestamp = "2017-01-01T21:45:00Z", +value = 1974888, +}, +new +{ +timestamp = "2017-01-01T21:50:00Z", +value = 2157136, +}, +new +{ +timestamp = "2017-01-01T21:55:00Z", +value = 2154987, +}, +new +{ +timestamp = "2017-01-01T22:00:00Z", +value = 2155664, +}, +new +{ +timestamp = "2017-01-01T22:05:00Z", +value = 2155660, +}, +new +{ +timestamp = "2017-01-01T22:10:00Z", +value = 2155824, +}, +new +{ +timestamp = "2017-01-01T22:15:00Z", +value = 2155824, +}, +new +{ +timestamp = "2017-01-01T22:20:00Z", +value = 2156329, +}, +new +{ +timestamp = "2017-01-01T22:25:00Z", +value = 2156479, +}, +new +{ +timestamp = "2017-01-01T22:30:00Z", +value = 2165269, +}, +new +{ +timestamp = "2017-01-01T22:35:00Z", +value = 2165433, +}, +new +{ +timestamp = "2017-01-01T22:40:00Z", +value = 2165739, +}, +new +{ +timestamp = "2017-01-01T22:45:00Z", +value = 2165931, +}, new { -timestamp = "2022-05-10T18:57:31.2311892Z", -value = 123.45F, +timestamp = "2017-01-01T22:50:00Z", +value = 2165928, +}, +new +{ +timestamp = "2017-01-01T22:55:00Z", +value = 2165989, +}, +new +{ +timestamp = "2017-01-01T23:00:00Z", +value = 2228961, +}, +new +{ +timestamp = "2017-01-01T23:05:00Z", +value = 2228961, +}, +new +{ +timestamp = "2017-01-01T23:10:00Z", +value = 2228961, +}, +new +{ +timestamp = "2017-01-01T23:15:00Z", +value = 2485802, +}, +new +{ +timestamp = "2017-01-01T23:20:00Z", +value = 2485802, +}, +new +{ +timestamp = "2017-01-01T23:25:00Z", +value = 2486021, +}, +new +{ +timestamp = "2017-01-01T23:30:00Z", +value = 2485293, +}, +new +{ +timestamp = "2017-01-01T23:35:00Z", +value = 2485293, +}, +new +{ +timestamp = "2017-01-01T23:40:00Z", +value = 2485324, +}, +new +{ +timestamp = "2017-01-01T23:45:00Z", +value = 2489142, +}, +new +{ +timestamp = "2017-01-01T23:50:00Z", +value = 2526312, +}, +new +{ +timestamp = "2017-01-01T23:55:00Z", +value = 2526313, +}, +new +{ +timestamp = "2017-01-02T00:00:00Z", +value = 2526314, +}, +new +{ +timestamp = "2017-01-02T00:05:00Z", +value = 2526324, +}, +new +{ +timestamp = "2017-01-02T00:10:00Z", +value = 2526325, +}, +new +{ +timestamp = "2017-01-02T00:15:00Z", +value = 2526205, +}, +new +{ +timestamp = "2017-01-02T00:20:00Z", +value = 2526226, +}, +new +{ +timestamp = "2017-01-02T00:25:00Z", +value = 2526475, +}, +new +{ +timestamp = "2017-01-02T00:30:00Z", +value = 2526471, +}, +new +{ +timestamp = "2017-01-02T00:35:00Z", +value = 2526471, +}, +new +{ +timestamp = "2017-01-02T00:40:00Z", +value = 2526534, +}, +new +{ +timestamp = "2017-01-02T00:45:00Z", +value = 2526646, +}, +new +{ +timestamp = "2017-01-02T00:50:00Z", +value = 2526646, +}, +new +{ +timestamp = "2017-01-02T00:55:00Z", +value = 2526648, +}, +new +{ +timestamp = "2017-01-02T01:00:00Z", +value = 2526658, +}, +new +{ +timestamp = "2017-01-02T01:05:00Z", +value = 2526771, +}, +new +{ +timestamp = "2017-01-02T01:10:00Z", +value = 2526773, +}, +new +{ +timestamp = "2017-01-02T01:15:00Z", +value = 2526793, +}, +new +{ +timestamp = "2017-01-02T01:20:00Z", +value = 2527010, +}, +new +{ +timestamp = "2017-01-02T01:25:00Z", +value = 2527031, +}, +new +{ +timestamp = "2017-01-02T01:30:00Z", +value = 3178096, +}, +new +{ +timestamp = "2017-01-02T01:35:00Z", +value = 3196305, +}, +new +{ +timestamp = "2017-01-02T01:40:00Z", +value = 3196202, +}, +new +{ +timestamp = "2017-01-02T01:45:00Z", +value = 3196202, +}, +new +{ +timestamp = "2017-01-02T01:50:00Z", +value = 3196205, +}, +new +{ +timestamp = "2017-01-02T01:55:00Z", +value = 3229232, +}, +new +{ +timestamp = "2017-01-02T02:00:00Z", +value = 3230463, +}, +new +{ +timestamp = "2017-01-02T02:05:00Z", +value = 3230468, +}, +new +{ +timestamp = "2017-01-02T02:10:00Z", +value = 3230468, +}, +new +{ +timestamp = "2017-01-02T02:15:00Z", +value = 3230468, +}, +new +{ +timestamp = "2017-01-02T02:20:00Z", +value = 3230470, +}, +new +{ +timestamp = "2017-01-02T02:25:00Z", +value = 3230467, +}, +new +{ +timestamp = "2017-01-02T02:30:00Z", +value = 3230506, +}, +new +{ +timestamp = "2017-01-02T02:35:00Z", +value = 3231536, +}, +new +{ +timestamp = "2017-01-02T02:40:00Z", +value = 3230723, +}, +new +{ +timestamp = "2017-01-02T02:45:00Z", +value = 3230727, +}, +new +{ +timestamp = "2017-01-02T02:50:00Z", +value = 3230727, +}, +new +{ +timestamp = "2017-01-02T02:55:00Z", +value = 3230727, +}, +new +{ +timestamp = "2017-01-02T03:00:00Z", +value = 3231880, +}, +new +{ +timestamp = "2017-01-02T03:05:00Z", +value = 3232283, +}, +new +{ +timestamp = "2017-01-02T03:10:00Z", +value = 3232283, +}, +new +{ +timestamp = "2017-01-02T03:15:00Z", +value = 3232283, +}, +new +{ +timestamp = "2017-01-02T03:20:00Z", +value = 3232325, +}, +new +{ +timestamp = "2017-01-02T03:25:00Z", +value = 3232323, +}, +new +{ +timestamp = "2017-01-02T03:30:00Z", +value = 3232327, +}, +new +{ +timestamp = "2017-01-02T03:35:00Z", +value = 3232340, +}, +new +{ +timestamp = "2017-01-02T03:40:00Z", +value = 3232713, +}, +new +{ +timestamp = "2017-01-02T03:45:00Z", +value = 3232729, +}, +new +{ +timestamp = "2017-01-02T03:50:00Z", +value = 3232756, +}, +new +{ +timestamp = "2017-01-02T03:55:00Z", +value = 3233500, +}, +new +{ +timestamp = "2017-01-02T04:00:00Z", +value = 3233500, +}, +new +{ +timestamp = "2017-01-02T04:05:00Z", +value = 3233500, } }, - granularity = "yearly", - customInterval = 1234, - period = 1234, - stableTrendWindow = 1234, - threshold = 123.45F, + granularity = "minutely", + customInterval = 5, + stableTrendWindow = 10, + threshold = 0.99, + period = 0, }); Response response = await client.DetectUnivariateChangePointAsync(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("period").ToString()); - Console.WriteLine(result.GetProperty("isChangePoint")[0].ToString()); - Console.WriteLine(result.GetProperty("confidenceScores")[0].ToString()); + Console.WriteLine(result.ToString()); } [Test] [Ignore("Only validating compilation of examples")] - public void Example_Univariate_DetectUnivariateChangePoint_AllParameters_Convenience() + public void Example_Univariate_DetectUnivariateChangePoint_UnivariateDetectionOfAChangePoint_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[] { -new TimeSeriesPoint(123.45F) +new TimeSeriesPoint(1639196) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T06:45:00Z"), +}, +new TimeSeriesPoint(1639290) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T06:50:00Z"), +}, +new TimeSeriesPoint(1667293) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T06:55:00Z"), +}, +new TimeSeriesPoint(1703130) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T07:00:00Z"), +}, +new TimeSeriesPoint(1650912) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T07:05:00Z"), +}, +new TimeSeriesPoint(1653596) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T07:10:00Z"), +}, +new TimeSeriesPoint(1653793) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T07:15:00Z"), +}, +new TimeSeriesPoint(1653795) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T07:20:00Z"), +}, +new TimeSeriesPoint(1663471) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T07:25:00Z"), +}, +new TimeSeriesPoint(1662358) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T07:30:00Z"), +}, +new TimeSeriesPoint(1664320) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T07:35:00Z"), +}, +new TimeSeriesPoint(1664942) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T07:40:00Z"), +}, +new TimeSeriesPoint(1664966) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T07:45:00Z"), +}, +new TimeSeriesPoint(1724271) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T07:50:00Z"), +}, +new TimeSeriesPoint(1678720) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T07:55:00Z"), +}, +new TimeSeriesPoint(1672536) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T08:00:00Z"), +}, +new TimeSeriesPoint(1672544) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T08:05:00Z"), +}, +new TimeSeriesPoint(1672364) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T08:10:00Z"), +}, +new TimeSeriesPoint(1672912) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T08:15:00Z"), +}, +new TimeSeriesPoint(1672736) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T08:20:00Z"), +}, +new TimeSeriesPoint(1672725) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T08:25:00Z"), +}, +new TimeSeriesPoint(1673247) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T08:30:00Z"), +}, +new TimeSeriesPoint(1673109) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T08:35:00Z"), +}, +new TimeSeriesPoint(1690088) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T08:40:00Z"), +}, +new TimeSeriesPoint(1703865) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T08:45:00Z"), +}, +new TimeSeriesPoint(1703865) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T08:50:00Z"), +}, +new TimeSeriesPoint(1786581) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T08:55:00Z"), +}, +new TimeSeriesPoint(1800945) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T09:00:00Z"), +}, +new TimeSeriesPoint(1800957) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T09:05:00Z"), +}, +new TimeSeriesPoint(1801191) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T09:10:00Z"), +}, +new TimeSeriesPoint(1801412) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T09:15:00Z"), +}, +new TimeSeriesPoint(1801621) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T09:20:00Z"), +}, +new TimeSeriesPoint(1801621) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T09:25:00Z"), +}, +new TimeSeriesPoint(1801654) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T09:30:00Z"), +}, +new TimeSeriesPoint(1802105) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T09:35:00Z"), +}, +new TimeSeriesPoint(1801800) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T09:40:00Z"), +}, +new TimeSeriesPoint(1803040) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T09:45:00Z"), +}, +new TimeSeriesPoint(1803672) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T09:50:00Z"), +}, +new TimeSeriesPoint(1803535) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T09:55:00Z"), +}, +new TimeSeriesPoint(1803541) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T10:00:00Z"), +}, +new TimeSeriesPoint(1803545) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T10:05:00Z"), +}, +new TimeSeriesPoint(1803599) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T10:10:00Z"), +}, +new TimeSeriesPoint(1803616) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T10:15:00Z"), +}, +new TimeSeriesPoint(1803619) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T10:20:00Z"), +}, +new TimeSeriesPoint(1809942) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T10:25:00Z"), +}, +new TimeSeriesPoint(1802720) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T10:30:00Z"), +}, +new TimeSeriesPoint(1802720) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T10:35:00Z"), +}, +new TimeSeriesPoint(1802888) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T10:40:00Z"), +}, +new TimeSeriesPoint(1809574) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T10:45:00Z"), +}, +new TimeSeriesPoint(1803896) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T10:50:00Z"), +}, +new TimeSeriesPoint(1803850) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T10:55:00Z"), +}, +new TimeSeriesPoint(1803854) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T11:00:00Z"), +}, +new TimeSeriesPoint(1803854) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T11:05:00Z"), +}, +new TimeSeriesPoint(1803797) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T11:10:00Z"), +}, +new TimeSeriesPoint(1803921) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T11:15:00Z"), +}, +new TimeSeriesPoint(1803933) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T11:20:00Z"), +}, +new TimeSeriesPoint(1804040) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T11:25:00Z"), +}, +new TimeSeriesPoint(1804044) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T11:30:00Z"), +}, +new TimeSeriesPoint(1804070) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T11:35:00Z"), +}, +new TimeSeriesPoint(1804070) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T11:40:00Z"), +}, +new TimeSeriesPoint(1804068) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T11:45:00Z"), +}, +new TimeSeriesPoint(1804073) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T11:50:00Z"), +}, +new TimeSeriesPoint(1804101) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T11:55:00Z"), +}, +new TimeSeriesPoint(1804674) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T12:00:00Z"), +}, +new TimeSeriesPoint(1804714) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T12:05:00Z"), +}, +new TimeSeriesPoint(1804730) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T12:10:00Z"), +}, +new TimeSeriesPoint(1804816) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T12:15:00Z"), +}, +new TimeSeriesPoint(1803996) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T12:20:00Z"), +}, +new TimeSeriesPoint(1803998) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T12:25:00Z"), +}, +new TimeSeriesPoint(1804015) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T12:30:00Z"), +}, +new TimeSeriesPoint(1804047) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T12:35:00Z"), +}, +new TimeSeriesPoint(1804050) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T12:40:00Z"), +}, +new TimeSeriesPoint(1804218) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T12:45:00Z"), +}, +new TimeSeriesPoint(1804217) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T12:50:00Z"), +}, +new TimeSeriesPoint(1804217) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T12:55:00Z"), +}, +new TimeSeriesPoint(1804205) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T13:00:00Z"), +}, +new TimeSeriesPoint(1804728) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T13:05:00Z"), +}, +new TimeSeriesPoint(1804748) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T13:10:00Z"), +}, +new TimeSeriesPoint(1805232) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T13:15:00Z"), +}, +new TimeSeriesPoint(1814121) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T13:20:00Z"), +}, +new TimeSeriesPoint(1806789) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T13:25:00Z"), +}, +new TimeSeriesPoint(1806119) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T13:30:00Z"), +}, +new TimeSeriesPoint(1806329) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T13:35:00Z"), +}, +new TimeSeriesPoint(1806454) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T13:40:00Z"), +}, +new TimeSeriesPoint(1806852) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T13:45:00Z"), +}, +new TimeSeriesPoint(1807347) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T13:50:00Z"), +}, +new TimeSeriesPoint(1812144) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T13:55:00Z"), +}, +new TimeSeriesPoint(1807418) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T14:00:00Z"), +}, +new TimeSeriesPoint(1807418) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T14:05:00Z"), +}, +new TimeSeriesPoint(1807432) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T14:10:00Z"), +}, +new TimeSeriesPoint(1808540) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T14:15:00Z"), +}, +new TimeSeriesPoint(1808541) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T14:20:00Z"), +}, +new TimeSeriesPoint(1807831) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T14:25:00Z"), +}, +new TimeSeriesPoint(1807852) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T14:30:00Z"), +}, +new TimeSeriesPoint(1807811) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T14:35:00Z"), +}, +new TimeSeriesPoint(2214285) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T14:40:00Z"), +}, +new TimeSeriesPoint(2215019) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T14:45:00Z"), +}, +new TimeSeriesPoint(2215329) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T14:50:00Z"), +}, +new TimeSeriesPoint(2215097) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T14:55:00Z"), +}, +new TimeSeriesPoint(2215129) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T15:00:00Z"), +}, +new TimeSeriesPoint(2215120) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T15:05:00Z"), +}, +new TimeSeriesPoint(2217056) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T15:10:00Z"), +}, +new TimeSeriesPoint(2217056) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T15:15:00Z"), +}, +new TimeSeriesPoint(2222126) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T15:20:00Z"), +}, +new TimeSeriesPoint(2226472) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T15:25:00Z"), +}, +new TimeSeriesPoint(2226722) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T15:30:00Z"), +}, +new TimeSeriesPoint(2226729) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T15:35:00Z"), +}, +new TimeSeriesPoint(2226735) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T15:40:00Z"), +}, +new TimeSeriesPoint(2226735) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T15:45:00Z"), +}, +new TimeSeriesPoint(2226735) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T15:50:00Z"), +}, +new TimeSeriesPoint(2226952) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T15:55:00Z"), +}, +new TimeSeriesPoint(2226962) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T16:00:00Z"), +}, +new TimeSeriesPoint(2649337) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T16:05:00Z"), +}, +new TimeSeriesPoint(2092796) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T16:10:00Z"), +}, +new TimeSeriesPoint(2092839) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T16:15:00Z"), +}, +new TimeSeriesPoint(2092940) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T16:20:00Z"), +}, +new TimeSeriesPoint(2092940) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T16:25:00Z"), +}, +new TimeSeriesPoint(2092965) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T16:30:00Z"), +}, +new TimeSeriesPoint(2092979) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T16:35:00Z"), +}, +new TimeSeriesPoint(2095588) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T16:40:00Z"), +}, +new TimeSeriesPoint(2099586) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T16:45:00Z"), +}, +new TimeSeriesPoint(2102981) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T16:50:00Z"), +}, +new TimeSeriesPoint(2108053) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T16:55:00Z"), +}, +new TimeSeriesPoint(2107907) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T17:00:00Z"), +}, +new TimeSeriesPoint(2108241) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T17:05:00Z"), +}, +new TimeSeriesPoint(2100321) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T17:10:00Z"), +}, +new TimeSeriesPoint(2100448) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T17:15:00Z"), +}, +new TimeSeriesPoint(2100483) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T17:20:00Z"), +}, +new TimeSeriesPoint(2103042) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T17:25:00Z"), +}, +new TimeSeriesPoint(2103037) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T17:30:00Z"), +}, +new TimeSeriesPoint(2103040) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T17:35:00Z"), +}, +new TimeSeriesPoint(2103054) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T17:40:00Z"), +}, +new TimeSeriesPoint(2103058) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T17:45:00Z"), +}, +new TimeSeriesPoint(1830757) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T17:50:00Z"), +}, +new TimeSeriesPoint(1830855) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T17:55:00Z"), +}, +new TimeSeriesPoint(1831495) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T18:00:00Z"), +}, +new TimeSeriesPoint(1831463) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T18:05:00Z"), +}, +new TimeSeriesPoint(1831963) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T18:10:00Z"), +}, +new TimeSeriesPoint(1832046) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T18:15:00Z"), +}, +new TimeSeriesPoint(1832070) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T18:20:00Z"), +}, +new TimeSeriesPoint(1835511) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T18:25:00Z"), +}, +new TimeSeriesPoint(1835265) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T18:30:00Z"), +}, +new TimeSeriesPoint(1835481) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T18:35:00Z"), +}, +new TimeSeriesPoint(1835578) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T18:40:00Z"), +}, +new TimeSeriesPoint(1835611) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T18:45:00Z"), +}, +new TimeSeriesPoint(1836314) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T18:50:00Z"), +}, +new TimeSeriesPoint(1836369) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T18:55:00Z"), +}, +new TimeSeriesPoint(1837280) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T19:00:00Z"), +}, +new TimeSeriesPoint(1842939) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T19:05:00Z"), +}, +new TimeSeriesPoint(1843126) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T19:10:00Z"), +}, +new TimeSeriesPoint(1845840) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T19:15:00Z"), +}, +new TimeSeriesPoint(1842444) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T19:20:00Z"), +}, +new TimeSeriesPoint(1839891) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T19:25:00Z"), +}, +new TimeSeriesPoint(1839875) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T19:30:00Z"), +}, +new TimeSeriesPoint(1839870) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T19:35:00Z"), +}, +new TimeSeriesPoint(1840090) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T19:40:00Z"), +}, +new TimeSeriesPoint(1840479) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T19:45:00Z"), +}, +new TimeSeriesPoint(1840479) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T19:50:00Z"), +}, +new TimeSeriesPoint(1840482) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T19:55:00Z"), +}, +new TimeSeriesPoint(1841522) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T20:00:00Z"), +}, +new TimeSeriesPoint(1841836) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T20:05:00Z"), +}, +new TimeSeriesPoint(1842377) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T20:10:00Z"), +}, +new TimeSeriesPoint(1842388) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T20:15:00Z"), +}, +new TimeSeriesPoint(1842489) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T20:20:00Z"), +}, +new TimeSeriesPoint(1842489) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T20:25:00Z"), +}, +new TimeSeriesPoint(1842489) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T20:30:00Z"), +}, +new TimeSeriesPoint(1842496) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T20:35:00Z"), +}, +new TimeSeriesPoint(1842689) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T20:40:00Z"), +}, +new TimeSeriesPoint(1843117) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T20:45:00Z"), +}, +new TimeSeriesPoint(1843116) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T20:50:00Z"), +}, +new TimeSeriesPoint(1843227) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T20:55:00Z"), +}, +new TimeSeriesPoint(1843138) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T21:00:00Z"), +}, +new TimeSeriesPoint(1843141) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T21:05:00Z"), +}, +new TimeSeriesPoint(1843310) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T21:10:00Z"), +}, +new TimeSeriesPoint(1843310) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T21:15:00Z"), +}, +new TimeSeriesPoint(1843507) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T21:20:00Z"), +}, +new TimeSeriesPoint(1843953) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T21:25:00Z"), +}, +new TimeSeriesPoint(1844778) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T21:30:00Z"), +}, +new TimeSeriesPoint(1843918) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T21:35:00Z"), +}, +new TimeSeriesPoint(1882692) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T21:40:00Z"), +}, +new TimeSeriesPoint(1974888) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T21:45:00Z"), +}, +new TimeSeriesPoint(2157136) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T21:50:00Z"), +}, +new TimeSeriesPoint(2154987) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T21:55:00Z"), +}, +new TimeSeriesPoint(2155664) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T22:00:00Z"), +}, +new TimeSeriesPoint(2155660) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T22:05:00Z"), +}, +new TimeSeriesPoint(2155824) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T22:10:00Z"), +}, +new TimeSeriesPoint(2155824) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T22:15:00Z"), +}, +new TimeSeriesPoint(2156329) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T22:20:00Z"), +}, +new TimeSeriesPoint(2156479) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T22:25:00Z"), +}, +new TimeSeriesPoint(2165269) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T22:30:00Z"), +}, +new TimeSeriesPoint(2165433) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T22:35:00Z"), +}, +new TimeSeriesPoint(2165739) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T22:40:00Z"), +}, +new TimeSeriesPoint(2165931) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T22:45:00Z"), +}, +new TimeSeriesPoint(2165928) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T22:50:00Z"), +}, +new TimeSeriesPoint(2165989) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T22:55:00Z"), +}, +new TimeSeriesPoint(2228961) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T23:00:00Z"), +}, +new TimeSeriesPoint(2228961) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T23:05:00Z"), +}, +new TimeSeriesPoint(2228961) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T23:10:00Z"), +}, +new TimeSeriesPoint(2485802) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T23:15:00Z"), +}, +new TimeSeriesPoint(2485802) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T23:20:00Z"), +}, +new TimeSeriesPoint(2486021) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T23:25:00Z"), +}, +new TimeSeriesPoint(2485293) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T23:30:00Z"), +}, +new TimeSeriesPoint(2485293) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T23:35:00Z"), +}, +new TimeSeriesPoint(2485324) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T23:40:00Z"), +}, +new TimeSeriesPoint(2489142) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T23:45:00Z"), +}, +new TimeSeriesPoint(2526312) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T23:50:00Z"), +}, +new TimeSeriesPoint(2526313) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T23:55:00Z"), +}, +new TimeSeriesPoint(2526314) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T00:00:00Z"), +}, +new TimeSeriesPoint(2526324) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T00:05:00Z"), +}, +new TimeSeriesPoint(2526325) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T00:10:00Z"), +}, +new TimeSeriesPoint(2526205) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T00:15:00Z"), +}, +new TimeSeriesPoint(2526226) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T00:20:00Z"), +}, +new TimeSeriesPoint(2526475) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T00:25:00Z"), +}, +new TimeSeriesPoint(2526471) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T00:30:00Z"), +}, +new TimeSeriesPoint(2526471) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T00:35:00Z"), +}, +new TimeSeriesPoint(2526534) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T00:40:00Z"), +}, +new TimeSeriesPoint(2526646) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T00:45:00Z"), +}, +new TimeSeriesPoint(2526646) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T00:50:00Z"), +}, +new TimeSeriesPoint(2526648) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T00:55:00Z"), +}, +new TimeSeriesPoint(2526658) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T01:00:00Z"), +}, +new TimeSeriesPoint(2526771) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T01:05:00Z"), +}, +new TimeSeriesPoint(2526773) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T01:10:00Z"), +}, +new TimeSeriesPoint(2526793) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T01:15:00Z"), +}, +new TimeSeriesPoint(2527010) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T01:20:00Z"), +}, +new TimeSeriesPoint(2527031) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T01:25:00Z"), +}, +new TimeSeriesPoint(3178096) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T01:30:00Z"), +}, +new TimeSeriesPoint(3196305) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T01:35:00Z"), +}, +new TimeSeriesPoint(3196202) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T01:40:00Z"), +}, +new TimeSeriesPoint(3196202) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T01:45:00Z"), +}, +new TimeSeriesPoint(3196205) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T01:50:00Z"), +}, +new TimeSeriesPoint(3229232) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T01:55:00Z"), +}, +new TimeSeriesPoint(3230463) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T02:00:00Z"), +}, +new TimeSeriesPoint(3230468) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T02:05:00Z"), +}, +new TimeSeriesPoint(3230468) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T02:10:00Z"), +}, +new TimeSeriesPoint(3230468) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T02:15:00Z"), +}, +new TimeSeriesPoint(3230470) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T02:20:00Z"), +}, +new TimeSeriesPoint(3230467) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T02:25:00Z"), +}, +new TimeSeriesPoint(3230506) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T02:30:00Z"), +}, +new TimeSeriesPoint(3231536) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T02:35:00Z"), +}, +new TimeSeriesPoint(3230723) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T02:40:00Z"), +}, +new TimeSeriesPoint(3230727) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T02:45:00Z"), +}, +new TimeSeriesPoint(3230727) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T02:50:00Z"), +}, +new TimeSeriesPoint(3230727) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T02:55:00Z"), +}, +new TimeSeriesPoint(3231880) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T03:00:00Z"), +}, +new TimeSeriesPoint(3232283) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T03:05:00Z"), +}, +new TimeSeriesPoint(3232283) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T03:10:00Z"), +}, +new TimeSeriesPoint(3232283) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T03:15:00Z"), +}, +new TimeSeriesPoint(3232325) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T03:20:00Z"), +}, +new TimeSeriesPoint(3232323) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T03:25:00Z"), +}, +new TimeSeriesPoint(3232327) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T03:30:00Z"), +}, +new TimeSeriesPoint(3232340) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T03:35:00Z"), +}, +new TimeSeriesPoint(3232713) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T03:40:00Z"), +}, +new TimeSeriesPoint(3232729) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T03:45:00Z"), +}, +new TimeSeriesPoint(3232756) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T03:50:00Z"), +}, +new TimeSeriesPoint(3233500) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T03:55:00Z"), +}, +new TimeSeriesPoint(3233500) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T04:00:00Z"), +}, +new TimeSeriesPoint(3233500) { -Timestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), +Timestamp = DateTimeOffset.Parse("2017-01-02T04:05:00Z"), } - }, TimeGranularity.Yearly) + }, TimeGranularity.PerMinute) { - CustomInterval = 1234, - Period = 1234, - StableTrendWindow = 1234, - Threshold = 123.45F, + CustomInterval = 5, + Period = 0, + StableTrendWindow = 10, + Threshold = (float)0.99, }; Response response = client.DetectUnivariateChangePoint(options); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_Univariate_DetectUnivariateChangePoint_AllParameters_Convenience_Async() + public async Task Example_Univariate_DetectUnivariateChangePoint_UnivariateDetectionOfAChangePoint_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = new AzureKeyCredential(""); Univariate client = new AnomalyDetectorClient(endpoint, credential).GetUnivariateClient(); UnivariateChangePointDetectionOptions options = new UnivariateChangePointDetectionOptions(new TimeSeriesPoint[] { -new TimeSeriesPoint(123.45F) +new TimeSeriesPoint(1639196) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T06:45:00Z"), +}, +new TimeSeriesPoint(1639290) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T06:50:00Z"), +}, +new TimeSeriesPoint(1667293) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T06:55:00Z"), +}, +new TimeSeriesPoint(1703130) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T07:00:00Z"), +}, +new TimeSeriesPoint(1650912) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T07:05:00Z"), +}, +new TimeSeriesPoint(1653596) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T07:10:00Z"), +}, +new TimeSeriesPoint(1653793) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T07:15:00Z"), +}, +new TimeSeriesPoint(1653795) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T07:20:00Z"), +}, +new TimeSeriesPoint(1663471) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T07:25:00Z"), +}, +new TimeSeriesPoint(1662358) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T07:30:00Z"), +}, +new TimeSeriesPoint(1664320) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T07:35:00Z"), +}, +new TimeSeriesPoint(1664942) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T07:40:00Z"), +}, +new TimeSeriesPoint(1664966) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T07:45:00Z"), +}, +new TimeSeriesPoint(1724271) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T07:50:00Z"), +}, +new TimeSeriesPoint(1678720) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T07:55:00Z"), +}, +new TimeSeriesPoint(1672536) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T08:00:00Z"), +}, +new TimeSeriesPoint(1672544) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T08:05:00Z"), +}, +new TimeSeriesPoint(1672364) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T08:10:00Z"), +}, +new TimeSeriesPoint(1672912) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T08:15:00Z"), +}, +new TimeSeriesPoint(1672736) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T08:20:00Z"), +}, +new TimeSeriesPoint(1672725) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T08:25:00Z"), +}, +new TimeSeriesPoint(1673247) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T08:30:00Z"), +}, +new TimeSeriesPoint(1673109) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T08:35:00Z"), +}, +new TimeSeriesPoint(1690088) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T08:40:00Z"), +}, +new TimeSeriesPoint(1703865) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T08:45:00Z"), +}, +new TimeSeriesPoint(1703865) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T08:50:00Z"), +}, +new TimeSeriesPoint(1786581) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T08:55:00Z"), +}, +new TimeSeriesPoint(1800945) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T09:00:00Z"), +}, +new TimeSeriesPoint(1800957) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T09:05:00Z"), +}, +new TimeSeriesPoint(1801191) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T09:10:00Z"), +}, +new TimeSeriesPoint(1801412) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T09:15:00Z"), +}, +new TimeSeriesPoint(1801621) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T09:20:00Z"), +}, +new TimeSeriesPoint(1801621) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T09:25:00Z"), +}, +new TimeSeriesPoint(1801654) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T09:30:00Z"), +}, +new TimeSeriesPoint(1802105) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T09:35:00Z"), +}, +new TimeSeriesPoint(1801800) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T09:40:00Z"), +}, +new TimeSeriesPoint(1803040) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T09:45:00Z"), +}, +new TimeSeriesPoint(1803672) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T09:50:00Z"), +}, +new TimeSeriesPoint(1803535) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T09:55:00Z"), +}, +new TimeSeriesPoint(1803541) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T10:00:00Z"), +}, +new TimeSeriesPoint(1803545) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T10:05:00Z"), +}, +new TimeSeriesPoint(1803599) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T10:10:00Z"), +}, +new TimeSeriesPoint(1803616) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T10:15:00Z"), +}, +new TimeSeriesPoint(1803619) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T10:20:00Z"), +}, +new TimeSeriesPoint(1809942) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T10:25:00Z"), +}, +new TimeSeriesPoint(1802720) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T10:30:00Z"), +}, +new TimeSeriesPoint(1802720) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T10:35:00Z"), +}, +new TimeSeriesPoint(1802888) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T10:40:00Z"), +}, +new TimeSeriesPoint(1809574) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T10:45:00Z"), +}, +new TimeSeriesPoint(1803896) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T10:50:00Z"), +}, +new TimeSeriesPoint(1803850) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T10:55:00Z"), +}, +new TimeSeriesPoint(1803854) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T11:00:00Z"), +}, +new TimeSeriesPoint(1803854) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T11:05:00Z"), +}, +new TimeSeriesPoint(1803797) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T11:10:00Z"), +}, +new TimeSeriesPoint(1803921) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T11:15:00Z"), +}, +new TimeSeriesPoint(1803933) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T11:20:00Z"), +}, +new TimeSeriesPoint(1804040) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T11:25:00Z"), +}, +new TimeSeriesPoint(1804044) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T11:30:00Z"), +}, +new TimeSeriesPoint(1804070) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T11:35:00Z"), +}, +new TimeSeriesPoint(1804070) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T11:40:00Z"), +}, +new TimeSeriesPoint(1804068) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T11:45:00Z"), +}, +new TimeSeriesPoint(1804073) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T11:50:00Z"), +}, +new TimeSeriesPoint(1804101) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T11:55:00Z"), +}, +new TimeSeriesPoint(1804674) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T12:00:00Z"), +}, +new TimeSeriesPoint(1804714) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T12:05:00Z"), +}, +new TimeSeriesPoint(1804730) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T12:10:00Z"), +}, +new TimeSeriesPoint(1804816) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T12:15:00Z"), +}, +new TimeSeriesPoint(1803996) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T12:20:00Z"), +}, +new TimeSeriesPoint(1803998) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T12:25:00Z"), +}, +new TimeSeriesPoint(1804015) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T12:30:00Z"), +}, +new TimeSeriesPoint(1804047) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T12:35:00Z"), +}, +new TimeSeriesPoint(1804050) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T12:40:00Z"), +}, +new TimeSeriesPoint(1804218) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T12:45:00Z"), +}, +new TimeSeriesPoint(1804217) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T12:50:00Z"), +}, +new TimeSeriesPoint(1804217) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T12:55:00Z"), +}, +new TimeSeriesPoint(1804205) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T13:00:00Z"), +}, +new TimeSeriesPoint(1804728) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T13:05:00Z"), +}, +new TimeSeriesPoint(1804748) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T13:10:00Z"), +}, +new TimeSeriesPoint(1805232) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T13:15:00Z"), +}, +new TimeSeriesPoint(1814121) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T13:20:00Z"), +}, +new TimeSeriesPoint(1806789) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T13:25:00Z"), +}, +new TimeSeriesPoint(1806119) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T13:30:00Z"), +}, +new TimeSeriesPoint(1806329) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T13:35:00Z"), +}, +new TimeSeriesPoint(1806454) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T13:40:00Z"), +}, +new TimeSeriesPoint(1806852) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T13:45:00Z"), +}, +new TimeSeriesPoint(1807347) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T13:50:00Z"), +}, +new TimeSeriesPoint(1812144) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T13:55:00Z"), +}, +new TimeSeriesPoint(1807418) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T14:00:00Z"), +}, +new TimeSeriesPoint(1807418) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T14:05:00Z"), +}, +new TimeSeriesPoint(1807432) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T14:10:00Z"), +}, +new TimeSeriesPoint(1808540) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T14:15:00Z"), +}, +new TimeSeriesPoint(1808541) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T14:20:00Z"), +}, +new TimeSeriesPoint(1807831) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T14:25:00Z"), +}, +new TimeSeriesPoint(1807852) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T14:30:00Z"), +}, +new TimeSeriesPoint(1807811) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T14:35:00Z"), +}, +new TimeSeriesPoint(2214285) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T14:40:00Z"), +}, +new TimeSeriesPoint(2215019) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T14:45:00Z"), +}, +new TimeSeriesPoint(2215329) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T14:50:00Z"), +}, +new TimeSeriesPoint(2215097) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T14:55:00Z"), +}, +new TimeSeriesPoint(2215129) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T15:00:00Z"), +}, +new TimeSeriesPoint(2215120) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T15:05:00Z"), +}, +new TimeSeriesPoint(2217056) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T15:10:00Z"), +}, +new TimeSeriesPoint(2217056) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T15:15:00Z"), +}, +new TimeSeriesPoint(2222126) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T15:20:00Z"), +}, +new TimeSeriesPoint(2226472) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T15:25:00Z"), +}, +new TimeSeriesPoint(2226722) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T15:30:00Z"), +}, +new TimeSeriesPoint(2226729) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T15:35:00Z"), +}, +new TimeSeriesPoint(2226735) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T15:40:00Z"), +}, +new TimeSeriesPoint(2226735) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T15:45:00Z"), +}, +new TimeSeriesPoint(2226735) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T15:50:00Z"), +}, +new TimeSeriesPoint(2226952) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T15:55:00Z"), +}, +new TimeSeriesPoint(2226962) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T16:00:00Z"), +}, +new TimeSeriesPoint(2649337) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T16:05:00Z"), +}, +new TimeSeriesPoint(2092796) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T16:10:00Z"), +}, +new TimeSeriesPoint(2092839) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T16:15:00Z"), +}, +new TimeSeriesPoint(2092940) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T16:20:00Z"), +}, +new TimeSeriesPoint(2092940) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T16:25:00Z"), +}, +new TimeSeriesPoint(2092965) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T16:30:00Z"), +}, +new TimeSeriesPoint(2092979) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T16:35:00Z"), +}, +new TimeSeriesPoint(2095588) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T16:40:00Z"), +}, +new TimeSeriesPoint(2099586) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T16:45:00Z"), +}, +new TimeSeriesPoint(2102981) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T16:50:00Z"), +}, +new TimeSeriesPoint(2108053) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T16:55:00Z"), +}, +new TimeSeriesPoint(2107907) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T17:00:00Z"), +}, +new TimeSeriesPoint(2108241) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T17:05:00Z"), +}, +new TimeSeriesPoint(2100321) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T17:10:00Z"), +}, +new TimeSeriesPoint(2100448) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T17:15:00Z"), +}, +new TimeSeriesPoint(2100483) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T17:20:00Z"), +}, +new TimeSeriesPoint(2103042) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T17:25:00Z"), +}, +new TimeSeriesPoint(2103037) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T17:30:00Z"), +}, +new TimeSeriesPoint(2103040) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T17:35:00Z"), +}, +new TimeSeriesPoint(2103054) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T17:40:00Z"), +}, +new TimeSeriesPoint(2103058) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T17:45:00Z"), +}, +new TimeSeriesPoint(1830757) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T17:50:00Z"), +}, +new TimeSeriesPoint(1830855) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T17:55:00Z"), +}, +new TimeSeriesPoint(1831495) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T18:00:00Z"), +}, +new TimeSeriesPoint(1831463) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T18:05:00Z"), +}, +new TimeSeriesPoint(1831963) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T18:10:00Z"), +}, +new TimeSeriesPoint(1832046) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T18:15:00Z"), +}, +new TimeSeriesPoint(1832070) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T18:20:00Z"), +}, +new TimeSeriesPoint(1835511) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T18:25:00Z"), +}, +new TimeSeriesPoint(1835265) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T18:30:00Z"), +}, +new TimeSeriesPoint(1835481) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T18:35:00Z"), +}, +new TimeSeriesPoint(1835578) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T18:40:00Z"), +}, +new TimeSeriesPoint(1835611) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T18:45:00Z"), +}, +new TimeSeriesPoint(1836314) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T18:50:00Z"), +}, +new TimeSeriesPoint(1836369) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T18:55:00Z"), +}, +new TimeSeriesPoint(1837280) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T19:00:00Z"), +}, +new TimeSeriesPoint(1842939) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T19:05:00Z"), +}, +new TimeSeriesPoint(1843126) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T19:10:00Z"), +}, +new TimeSeriesPoint(1845840) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T19:15:00Z"), +}, +new TimeSeriesPoint(1842444) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T19:20:00Z"), +}, +new TimeSeriesPoint(1839891) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T19:25:00Z"), +}, +new TimeSeriesPoint(1839875) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T19:30:00Z"), +}, +new TimeSeriesPoint(1839870) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T19:35:00Z"), +}, +new TimeSeriesPoint(1840090) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T19:40:00Z"), +}, +new TimeSeriesPoint(1840479) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T19:45:00Z"), +}, +new TimeSeriesPoint(1840479) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T19:50:00Z"), +}, +new TimeSeriesPoint(1840482) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T19:55:00Z"), +}, +new TimeSeriesPoint(1841522) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T20:00:00Z"), +}, +new TimeSeriesPoint(1841836) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T20:05:00Z"), +}, +new TimeSeriesPoint(1842377) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T20:10:00Z"), +}, +new TimeSeriesPoint(1842388) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T20:15:00Z"), +}, +new TimeSeriesPoint(1842489) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T20:20:00Z"), +}, +new TimeSeriesPoint(1842489) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T20:25:00Z"), +}, +new TimeSeriesPoint(1842489) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T20:30:00Z"), +}, +new TimeSeriesPoint(1842496) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T20:35:00Z"), +}, +new TimeSeriesPoint(1842689) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T20:40:00Z"), +}, +new TimeSeriesPoint(1843117) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T20:45:00Z"), +}, +new TimeSeriesPoint(1843116) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T20:50:00Z"), +}, +new TimeSeriesPoint(1843227) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T20:55:00Z"), +}, +new TimeSeriesPoint(1843138) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T21:00:00Z"), +}, +new TimeSeriesPoint(1843141) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T21:05:00Z"), +}, +new TimeSeriesPoint(1843310) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T21:10:00Z"), +}, +new TimeSeriesPoint(1843310) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T21:15:00Z"), +}, +new TimeSeriesPoint(1843507) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T21:20:00Z"), +}, +new TimeSeriesPoint(1843953) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T21:25:00Z"), +}, +new TimeSeriesPoint(1844778) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T21:30:00Z"), +}, +new TimeSeriesPoint(1843918) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T21:35:00Z"), +}, +new TimeSeriesPoint(1882692) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T21:40:00Z"), +}, +new TimeSeriesPoint(1974888) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T21:45:00Z"), +}, +new TimeSeriesPoint(2157136) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T21:50:00Z"), +}, +new TimeSeriesPoint(2154987) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T21:55:00Z"), +}, +new TimeSeriesPoint(2155664) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T22:00:00Z"), +}, +new TimeSeriesPoint(2155660) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T22:05:00Z"), +}, +new TimeSeriesPoint(2155824) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T22:10:00Z"), +}, +new TimeSeriesPoint(2155824) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T22:15:00Z"), +}, +new TimeSeriesPoint(2156329) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T22:20:00Z"), +}, +new TimeSeriesPoint(2156479) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T22:25:00Z"), +}, +new TimeSeriesPoint(2165269) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T22:30:00Z"), +}, +new TimeSeriesPoint(2165433) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T22:35:00Z"), +}, +new TimeSeriesPoint(2165739) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T22:40:00Z"), +}, +new TimeSeriesPoint(2165931) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T22:45:00Z"), +}, +new TimeSeriesPoint(2165928) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T22:50:00Z"), +}, +new TimeSeriesPoint(2165989) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T22:55:00Z"), +}, +new TimeSeriesPoint(2228961) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T23:00:00Z"), +}, +new TimeSeriesPoint(2228961) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T23:05:00Z"), +}, +new TimeSeriesPoint(2228961) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T23:10:00Z"), +}, +new TimeSeriesPoint(2485802) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T23:15:00Z"), +}, +new TimeSeriesPoint(2485802) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T23:20:00Z"), +}, +new TimeSeriesPoint(2486021) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T23:25:00Z"), +}, +new TimeSeriesPoint(2485293) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T23:30:00Z"), +}, +new TimeSeriesPoint(2485293) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T23:35:00Z"), +}, +new TimeSeriesPoint(2485324) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T23:40:00Z"), +}, +new TimeSeriesPoint(2489142) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T23:45:00Z"), +}, +new TimeSeriesPoint(2526312) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T23:50:00Z"), +}, +new TimeSeriesPoint(2526313) +{ +Timestamp = DateTimeOffset.Parse("2017-01-01T23:55:00Z"), +}, +new TimeSeriesPoint(2526314) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T00:00:00Z"), +}, +new TimeSeriesPoint(2526324) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T00:05:00Z"), +}, +new TimeSeriesPoint(2526325) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T00:10:00Z"), +}, +new TimeSeriesPoint(2526205) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T00:15:00Z"), +}, +new TimeSeriesPoint(2526226) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T00:20:00Z"), +}, +new TimeSeriesPoint(2526475) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T00:25:00Z"), +}, +new TimeSeriesPoint(2526471) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T00:30:00Z"), +}, +new TimeSeriesPoint(2526471) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T00:35:00Z"), +}, +new TimeSeriesPoint(2526534) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T00:40:00Z"), +}, +new TimeSeriesPoint(2526646) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T00:45:00Z"), +}, +new TimeSeriesPoint(2526646) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T00:50:00Z"), +}, +new TimeSeriesPoint(2526648) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T00:55:00Z"), +}, +new TimeSeriesPoint(2526658) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T01:00:00Z"), +}, +new TimeSeriesPoint(2526771) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T01:05:00Z"), +}, +new TimeSeriesPoint(2526773) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T01:10:00Z"), +}, +new TimeSeriesPoint(2526793) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T01:15:00Z"), +}, +new TimeSeriesPoint(2527010) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T01:20:00Z"), +}, +new TimeSeriesPoint(2527031) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T01:25:00Z"), +}, +new TimeSeriesPoint(3178096) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T01:30:00Z"), +}, +new TimeSeriesPoint(3196305) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T01:35:00Z"), +}, +new TimeSeriesPoint(3196202) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T01:40:00Z"), +}, +new TimeSeriesPoint(3196202) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T01:45:00Z"), +}, +new TimeSeriesPoint(3196205) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T01:50:00Z"), +}, +new TimeSeriesPoint(3229232) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T01:55:00Z"), +}, +new TimeSeriesPoint(3230463) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T02:00:00Z"), +}, +new TimeSeriesPoint(3230468) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T02:05:00Z"), +}, +new TimeSeriesPoint(3230468) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T02:10:00Z"), +}, +new TimeSeriesPoint(3230468) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T02:15:00Z"), +}, +new TimeSeriesPoint(3230470) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T02:20:00Z"), +}, +new TimeSeriesPoint(3230467) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T02:25:00Z"), +}, +new TimeSeriesPoint(3230506) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T02:30:00Z"), +}, +new TimeSeriesPoint(3231536) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T02:35:00Z"), +}, +new TimeSeriesPoint(3230723) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T02:40:00Z"), +}, +new TimeSeriesPoint(3230727) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T02:45:00Z"), +}, +new TimeSeriesPoint(3230727) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T02:50:00Z"), +}, +new TimeSeriesPoint(3230727) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T02:55:00Z"), +}, +new TimeSeriesPoint(3231880) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T03:00:00Z"), +}, +new TimeSeriesPoint(3232283) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T03:05:00Z"), +}, +new TimeSeriesPoint(3232283) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T03:10:00Z"), +}, +new TimeSeriesPoint(3232283) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T03:15:00Z"), +}, +new TimeSeriesPoint(3232325) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T03:20:00Z"), +}, +new TimeSeriesPoint(3232323) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T03:25:00Z"), +}, +new TimeSeriesPoint(3232327) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T03:30:00Z"), +}, +new TimeSeriesPoint(3232340) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T03:35:00Z"), +}, +new TimeSeriesPoint(3232713) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T03:40:00Z"), +}, +new TimeSeriesPoint(3232729) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T03:45:00Z"), +}, +new TimeSeriesPoint(3232756) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T03:50:00Z"), +}, +new TimeSeriesPoint(3233500) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T03:55:00Z"), +}, +new TimeSeriesPoint(3233500) +{ +Timestamp = DateTimeOffset.Parse("2017-01-02T04:00:00Z"), +}, +new TimeSeriesPoint(3233500) { -Timestamp = DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), +Timestamp = DateTimeOffset.Parse("2017-01-02T04:05:00Z"), } - }, TimeGranularity.Yearly) + }, TimeGranularity.PerMinute) { - CustomInterval = 1234, - Period = 1234, - StableTrendWindow = 1234, - Threshold = 123.45F, + CustomInterval = 5, + Period = 0, + StableTrendWindow = 10, + Threshold = (float)0.99, }; Response response = await client.DetectUnivariateChangePointAsync(options); } diff --git a/samples/AnomalyDetector/tspCodeModel.json b/samples/AnomalyDetector/tspCodeModel.json index 8ccc6a1047c..e5e86a052c2 100644 --- a/samples/AnomalyDetector/tspCodeModel.json +++ b/samples/AnomalyDetector/tspCodeModel.json @@ -2757,180 +2757,3721 @@ "GenerateProtocolMethod": true, "GenerateConvenienceMethod": true, "CrossLanguageDefinitionId": "AnomalyDetector.Univariate.DetectUnivariateEntireSeries", - "Decorators": [] - }, - { - "$id": "327", - "Name": "DetectUnivariateLastPoint", - "ResourceName": "Univariate", - "Summary": "Detect anomaly status of the latest point in time series.", - "Description": "This operation generates a model using the points that you sent into the API,\nand based on all data to determine whether the last point is anomalous.", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "314" - }, - { - "$ref": "316" - }, - { - "$id": "328", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "329", - "Kind": "constant", - "ValueType": { - "$id": "330", - "Kind": "string", - "Name": "string", - "CrossLanguageDefinitionId": "TypeSpec.string", - "Decorators": [] - }, - "Value": "application/json", - "Decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [] - }, - { - "$id": "331", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "332", - "Kind": "constant", - "ValueType": { - "$id": "333", - "Kind": "string", - "Name": "string", - "CrossLanguageDefinitionId": "TypeSpec.string", - "Decorators": [] - }, - "Value": "application/json", - "Decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [] - }, - { - "$id": "334", - "Name": "options", - "NameInRequest": "options", - "Description": "Method of univariate anomaly detection.", - "Type": { - "$ref": "216" - }, - "Location": "Body", - "IsApiVersion": false, - "IsContentType": false, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Method", - "Decorators": [] - } - ], - "Responses": [ - { - "$id": "335", - "StatusCodes": [ - 200 - ], - "BodyType": { - "$ref": "265" - }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{Endpoint}/anomalydetector/{ApiVersion}", - "Path": "/timeseries/last/detect", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "AnomalyDetector.Univariate.DetectUnivariateLastPoint", - "Decorators": [] - }, - { - "$id": "336", - "Name": "DetectUnivariateChangePoint", - "ResourceName": "Univariate", - "Summary": "Detect change point for the entire series", - "Description": "Evaluate change point score of every series point", - "Accessibility": "public", - "Parameters": [ - { - "$ref": "314" - }, - { - "$ref": "316" - }, - { - "$id": "337", - "Name": "contentType", - "NameInRequest": "Content-Type", - "Description": "Body parameter's content type. Known values are application/json", - "Type": { - "$id": "338", - "Kind": "constant", - "ValueType": { - "$id": "339", - "Kind": "string", - "Name": "string", - "CrossLanguageDefinitionId": "TypeSpec.string", - "Decorators": [] - }, - "Value": "application/json", - "Decorators": [] - }, - "Location": "Header", - "IsApiVersion": false, - "IsContentType": true, - "IsEndpoint": false, - "Explode": false, - "IsRequired": true, - "Kind": "Constant", - "Decorators": [] - }, + "Decorators": [], + "Examples": [ { - "$id": "340", - "Name": "accept", - "NameInRequest": "Accept", - "Type": { - "$id": "341", - "Kind": "constant", - "ValueType": { - "$id": "342", - "Kind": "string", - "Name": "string", - "CrossLanguageDefinitionId": "TypeSpec.string", - "Decorators": [] + "$id": "327", + "kind": "http", + "name": "Univariate detect entire series", + "description": "Univariate detect entire series", + "filePath": "v1.1/EntireDetect.json", + "rawExample": { + "$id": "328", + "operationId": "Univariate_DetectUnivariateEntireSeries", + "title": "Univariate detect entire series", + "parameters": { + "$id": "329", + "Endpoint": "{Endpoint}", + "ApiVersion": "v1.1", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "options": { + "$id": "330", + "series": [ + { + "$id": "331", + "timestamp": "1972-01-01T00:00:00Z", + "value": 826 + }, + { + "$id": "332", + "timestamp": "1972-02-01T00:00:00Z", + "value": 799 + }, + { + "$id": "333", + "timestamp": "1972-03-01T00:00:00Z", + "value": 890 + }, + { + "$id": "334", + "timestamp": "1972-04-01T00:00:00Z", + "value": 900 + }, + { + "$id": "335", + "timestamp": "1972-05-01T00:00:00Z", + "value": 961 + }, + { + "$id": "336", + "timestamp": "1972-06-01T00:00:00Z", + "value": 935 + }, + { + "$id": "337", + "timestamp": "1972-07-01T00:00:00Z", + "value": 894 + }, + { + "$id": "338", + "timestamp": "1972-08-01T00:00:00Z", + "value": 855 + }, + { + "$id": "339", + "timestamp": "1972-09-01T00:00:00Z", + "value": 809 + }, + { + "$id": "340", + "timestamp": "1972-10-01T00:00:00Z", + "value": 810 + }, + { + "$id": "341", + "timestamp": "1972-11-01T00:00:00Z", + "value": 766 + }, + { + "$id": "342", + "timestamp": "1972-12-01T00:00:00Z", + "value": 805 + }, + { + "$id": "343", + "timestamp": "1973-01-01T00:00:00Z", + "value": 821 + }, + { + "$id": "344", + "timestamp": "1973-02-01T00:00:00Z", + "value": 773 + }, + { + "$id": "345", + "timestamp": "1973-03-01T00:00:00Z", + "value": 883 + }, + { + "$id": "346", + "timestamp": "1973-04-01T00:00:00Z", + "value": 898 + }, + { + "$id": "347", + "timestamp": "1973-05-01T00:00:00Z", + "value": 957 + }, + { + "$id": "348", + "timestamp": "1973-06-01T00:00:00Z", + "value": 924 + }, + { + "$id": "349", + "timestamp": "1973-07-01T00:00:00Z", + "value": 881 + }, + { + "$id": "350", + "timestamp": "1973-08-01T00:00:00Z", + "value": 837 + }, + { + "$id": "351", + "timestamp": "1973-09-01T00:00:00Z", + "value": 784 + }, + { + "$id": "352", + "timestamp": "1973-10-01T00:00:00Z", + "value": 791 + }, + { + "$id": "353", + "timestamp": "1973-11-01T00:00:00Z", + "value": 760 + }, + { + "$id": "354", + "timestamp": "1973-12-01T00:00:00Z", + "value": 802 + }, + { + "$id": "355", + "timestamp": "1974-01-01T00:00:00Z", + "value": 828 + }, + { + "$id": "356", + "timestamp": "1974-02-01T00:00:00Z", + "value": 1030 + }, + { + "$id": "357", + "timestamp": "1974-03-01T00:00:00Z", + "value": 889 + }, + { + "$id": "358", + "timestamp": "1974-04-01T00:00:00Z", + "value": 902 + }, + { + "$id": "359", + "timestamp": "1974-05-01T00:00:00Z", + "value": 969 + }, + { + "$id": "360", + "timestamp": "1974-06-01T00:00:00Z", + "value": 947 + }, + { + "$id": "361", + "timestamp": "1974-07-01T00:00:00Z", + "value": 908 + }, + { + "$id": "362", + "timestamp": "1974-08-01T00:00:00Z", + "value": 867 + }, + { + "$id": "363", + "timestamp": "1974-09-01T00:00:00Z", + "value": 815 + }, + { + "$id": "364", + "timestamp": "1974-10-01T00:00:00Z", + "value": 812 + }, + { + "$id": "365", + "timestamp": "1974-11-01T00:00:00Z", + "value": 773 + }, + { + "$id": "366", + "timestamp": "1974-12-01T00:00:00Z", + "value": 813 + }, + { + "$id": "367", + "timestamp": "1975-01-01T00:00:00Z", + "value": 834 + }, + { + "$id": "368", + "timestamp": "1975-02-01T00:00:00Z", + "value": 782 + }, + { + "$id": "369", + "timestamp": "1975-03-01T00:00:00Z", + "value": 892 + }, + { + "$id": "370", + "timestamp": "1975-04-01T00:00:00Z", + "value": 903 + }, + { + "$id": "371", + "timestamp": "1975-05-01T00:00:00Z", + "value": 966 + }, + { + "$id": "372", + "timestamp": "1975-06-01T00:00:00Z", + "value": 937 + }, + { + "$id": "373", + "timestamp": "1975-07-01T00:00:00Z", + "value": 896 + }, + { + "$id": "374", + "timestamp": "1975-08-01T00:00:00Z", + "value": 858 + }, + { + "$id": "375", + "timestamp": "1975-09-01T00:00:00Z", + "value": 817 + }, + { + "$id": "376", + "timestamp": "1975-10-01T00:00:00Z", + "value": 827 + }, + { + "$id": "377", + "timestamp": "1975-11-01T00:00:00Z", + "value": 797 + }, + { + "$id": "378", + "timestamp": "1975-12-01T00:00:00Z", + "value": 843 + } + ], + "maxAnomalyRatio": 0.25, + "sensitivity": 95, + "granularity": "monthly", + "imputeMode": "auto" + } }, - "Value": "application/json", - "Decorators": [] + "responses": { + "200": { + "$id": "380", + "body": { + "$id": "381", + "isNegativeAnomaly": [ + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "expectedValues": [ + 827.7940908243968, + 798.9133774671927, + 888.6058431807189, + 900.5606407986661, + 962.8389426378304, + 933.2591606306954, + 891.0784104799666, + 856.1781601363697, + 809.8987227908941, + 807.375129007505, + 764.3196682448518, + 803.933498594564, + 823.5900620883058, + 794.0905641334288, + 883.164245249282, + 894.8419000690953, + 956.8430591101258, + 927.6285055190114, + 885.812983784303, + 851.6424797402517, + 806.0927886943216, + 804.6826815312029, + 762.74070738882, + 804.0251702513732, + 825.3523662579559, + 798.0404188724976, + 889.3016505577698, + 902.4226124345937, + 965.867078532635, + 937.3200495736695, + 896.1720524711102, + 862.0087368413656, + 816.4662342097423, + 814.4297745524709, + 771.8614479159354, + 811.859271346729, + 831.8998279215521, + 802.947544797165, + 892.5684407435083, + 904.5488214533809, + 966.8527063844707, + 937.3168391003043, + 895.180003672544, + 860.3649596356635, + 814.1707285969043, + 811.9054862686213, + 769.1083769610742, + 809.2328084659704 + ], + "isPositiveAnomaly": [ + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "lowerMargins": [ + 41.389704541219835, + 39.94566887335964, + 44.43029215903594, + 45.02803203993331, + 48.14194713189152, + 46.66295803153477, + 44.55392052399833, + 42.808908006818484, + 40.494936139544706, + 40.36875645037525, + 38.215983412242586, + 40.196674929728196, + 41.17950310441529, + 39.70452820667144, + 44.1582122624641, + 44.74209500345477, + 47.84215295550629, + 46.38142527595057, + 44.290649189215145, + 42.58212398701258, + 40.30463943471608, + 40.234134076560146, + 38.137035369441, + 40.201258512568664, + 41.267618312897795, + 39.90202094362488, + 44.46508252788849, + 45.121130621729684, + 48.29335392663175, + 46.86600247868348, + 44.80860262355551, + 43.100436842068284, + 40.82331171048711, + 40.721488727623544, + 38.593072395796774, + 40.59296356733645, + 41.5949913960776, + 40.14737723985825, + 44.62842203717541, + 45.227441072669045, + 48.34263531922354, + 46.86584195501521, + 44.759000183627194, + 43.01824798178317, + 40.70853642984521, + 40.59527431343106, + 38.45541884805371, + 40.46164042329852 + ], + "period": 12, + "upperMargins": [ + 41.389704541219835, + 39.94566887335964, + 44.43029215903594, + 45.02803203993331, + 48.14194713189152, + 46.66295803153477, + 44.55392052399833, + 42.808908006818484, + 40.494936139544706, + 40.36875645037525, + 38.215983412242586, + 40.196674929728196, + 41.17950310441529, + 39.70452820667144, + 44.1582122624641, + 44.74209500345477, + 47.84215295550629, + 46.38142527595057, + 44.290649189215145, + 42.58212398701258, + 40.30463943471608, + 40.234134076560146, + 38.137035369441, + 40.201258512568664, + 41.267618312897795, + 39.90202094362488, + 44.46508252788849, + 45.121130621729684, + 48.29335392663175, + 46.86600247868348, + 44.80860262355551, + 43.100436842068284, + 40.82331171048711, + 40.721488727623544, + 38.593072395796774, + 40.59296356733645, + 41.5949913960776, + 40.14737723985825, + 44.62842203717541, + 45.227441072669045, + 48.34263531922354, + 46.86584195501521, + 44.759000183627194, + 43.01824798178317, + 40.70853642984521, + 40.59527431343106, + 38.45541884805371, + 40.46164042329852 + ], + "isAnomaly": [ + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "severity": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0.2906614447614368, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + } + }, + "$id": "379" + } + }, + "parameters": [ + { + "$id": "382", + "parameter": { + "$ref": "325" + }, + "value": { + "$id": "383", + "kind": "model", + "type": { + "$ref": "216" + }, + "value": { + "$id": "384", + "series": { + "$id": "385", + "kind": "array", + "type": { + "$ref": "218" + }, + "value": [ + { + "$id": "386", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "387", + "timestamp": { + "$id": "388", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1972-01-01T00:00:00Z" + }, + "value": { + "$id": "389", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 826 + } + } + }, + { + "$id": "390", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "391", + "timestamp": { + "$id": "392", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1972-02-01T00:00:00Z" + }, + "value": { + "$id": "393", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 799 + } + } + }, + { + "$id": "394", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "395", + "timestamp": { + "$id": "396", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1972-03-01T00:00:00Z" + }, + "value": { + "$id": "397", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 890 + } + } + }, + { + "$id": "398", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "399", + "timestamp": { + "$id": "400", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1972-04-01T00:00:00Z" + }, + "value": { + "$id": "401", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 900 + } + } + }, + { + "$id": "402", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "403", + "timestamp": { + "$id": "404", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1972-05-01T00:00:00Z" + }, + "value": { + "$id": "405", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 961 + } + } + }, + { + "$id": "406", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "407", + "timestamp": { + "$id": "408", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1972-06-01T00:00:00Z" + }, + "value": { + "$id": "409", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 935 + } + } + }, + { + "$id": "410", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "411", + "timestamp": { + "$id": "412", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1972-07-01T00:00:00Z" + }, + "value": { + "$id": "413", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 894 + } + } + }, + { + "$id": "414", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "415", + "timestamp": { + "$id": "416", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1972-08-01T00:00:00Z" + }, + "value": { + "$id": "417", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 855 + } + } + }, + { + "$id": "418", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "419", + "timestamp": { + "$id": "420", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1972-09-01T00:00:00Z" + }, + "value": { + "$id": "421", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 809 + } + } + }, + { + "$id": "422", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "423", + "timestamp": { + "$id": "424", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1972-10-01T00:00:00Z" + }, + "value": { + "$id": "425", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 810 + } + } + }, + { + "$id": "426", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "427", + "timestamp": { + "$id": "428", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1972-11-01T00:00:00Z" + }, + "value": { + "$id": "429", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 766 + } + } + }, + { + "$id": "430", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "431", + "timestamp": { + "$id": "432", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1972-12-01T00:00:00Z" + }, + "value": { + "$id": "433", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 805 + } + } + }, + { + "$id": "434", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "435", + "timestamp": { + "$id": "436", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1973-01-01T00:00:00Z" + }, + "value": { + "$id": "437", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 821 + } + } + }, + { + "$id": "438", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "439", + "timestamp": { + "$id": "440", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1973-02-01T00:00:00Z" + }, + "value": { + "$id": "441", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 773 + } + } + }, + { + "$id": "442", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "443", + "timestamp": { + "$id": "444", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1973-03-01T00:00:00Z" + }, + "value": { + "$id": "445", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 883 + } + } + }, + { + "$id": "446", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "447", + "timestamp": { + "$id": "448", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1973-04-01T00:00:00Z" + }, + "value": { + "$id": "449", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 898 + } + } + }, + { + "$id": "450", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "451", + "timestamp": { + "$id": "452", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1973-05-01T00:00:00Z" + }, + "value": { + "$id": "453", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 957 + } + } + }, + { + "$id": "454", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "455", + "timestamp": { + "$id": "456", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1973-06-01T00:00:00Z" + }, + "value": { + "$id": "457", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 924 + } + } + }, + { + "$id": "458", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "459", + "timestamp": { + "$id": "460", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1973-07-01T00:00:00Z" + }, + "value": { + "$id": "461", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 881 + } + } + }, + { + "$id": "462", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "463", + "timestamp": { + "$id": "464", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1973-08-01T00:00:00Z" + }, + "value": { + "$id": "465", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 837 + } + } + }, + { + "$id": "466", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "467", + "timestamp": { + "$id": "468", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1973-09-01T00:00:00Z" + }, + "value": { + "$id": "469", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 784 + } + } + }, + { + "$id": "470", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "471", + "timestamp": { + "$id": "472", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1973-10-01T00:00:00Z" + }, + "value": { + "$id": "473", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 791 + } + } + }, + { + "$id": "474", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "475", + "timestamp": { + "$id": "476", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1973-11-01T00:00:00Z" + }, + "value": { + "$id": "477", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 760 + } + } + }, + { + "$id": "478", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "479", + "timestamp": { + "$id": "480", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1973-12-01T00:00:00Z" + }, + "value": { + "$id": "481", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 802 + } + } + }, + { + "$id": "482", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "483", + "timestamp": { + "$id": "484", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1974-01-01T00:00:00Z" + }, + "value": { + "$id": "485", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 828 + } + } + }, + { + "$id": "486", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "487", + "timestamp": { + "$id": "488", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1974-02-01T00:00:00Z" + }, + "value": { + "$id": "489", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1030 + } + } + }, + { + "$id": "490", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "491", + "timestamp": { + "$id": "492", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1974-03-01T00:00:00Z" + }, + "value": { + "$id": "493", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 889 + } + } + }, + { + "$id": "494", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "495", + "timestamp": { + "$id": "496", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1974-04-01T00:00:00Z" + }, + "value": { + "$id": "497", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 902 + } + } + }, + { + "$id": "498", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "499", + "timestamp": { + "$id": "500", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1974-05-01T00:00:00Z" + }, + "value": { + "$id": "501", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 969 + } + } + }, + { + "$id": "502", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "503", + "timestamp": { + "$id": "504", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1974-06-01T00:00:00Z" + }, + "value": { + "$id": "505", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 947 + } + } + }, + { + "$id": "506", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "507", + "timestamp": { + "$id": "508", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1974-07-01T00:00:00Z" + }, + "value": { + "$id": "509", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 908 + } + } + }, + { + "$id": "510", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "511", + "timestamp": { + "$id": "512", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1974-08-01T00:00:00Z" + }, + "value": { + "$id": "513", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 867 + } + } + }, + { + "$id": "514", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "515", + "timestamp": { + "$id": "516", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1974-09-01T00:00:00Z" + }, + "value": { + "$id": "517", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 815 + } + } + }, + { + "$id": "518", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "519", + "timestamp": { + "$id": "520", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1974-10-01T00:00:00Z" + }, + "value": { + "$id": "521", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 812 + } + } + }, + { + "$id": "522", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "523", + "timestamp": { + "$id": "524", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1974-11-01T00:00:00Z" + }, + "value": { + "$id": "525", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 773 + } + } + }, + { + "$id": "526", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "527", + "timestamp": { + "$id": "528", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1974-12-01T00:00:00Z" + }, + "value": { + "$id": "529", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 813 + } + } + }, + { + "$id": "530", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "531", + "timestamp": { + "$id": "532", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1975-01-01T00:00:00Z" + }, + "value": { + "$id": "533", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 834 + } + } + }, + { + "$id": "534", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "535", + "timestamp": { + "$id": "536", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1975-02-01T00:00:00Z" + }, + "value": { + "$id": "537", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 782 + } + } + }, + { + "$id": "538", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "539", + "timestamp": { + "$id": "540", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1975-03-01T00:00:00Z" + }, + "value": { + "$id": "541", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 892 + } + } + }, + { + "$id": "542", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "543", + "timestamp": { + "$id": "544", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1975-04-01T00:00:00Z" + }, + "value": { + "$id": "545", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 903 + } + } + }, + { + "$id": "546", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "547", + "timestamp": { + "$id": "548", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1975-05-01T00:00:00Z" + }, + "value": { + "$id": "549", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 966 + } + } + }, + { + "$id": "550", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "551", + "timestamp": { + "$id": "552", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1975-06-01T00:00:00Z" + }, + "value": { + "$id": "553", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 937 + } + } + }, + { + "$id": "554", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "555", + "timestamp": { + "$id": "556", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1975-07-01T00:00:00Z" + }, + "value": { + "$id": "557", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 896 + } + } + }, + { + "$id": "558", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "559", + "timestamp": { + "$id": "560", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1975-08-01T00:00:00Z" + }, + "value": { + "$id": "561", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 858 + } + } + }, + { + "$id": "562", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "563", + "timestamp": { + "$id": "564", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1975-09-01T00:00:00Z" + }, + "value": { + "$id": "565", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 817 + } + } + }, + { + "$id": "566", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "567", + "timestamp": { + "$id": "568", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1975-10-01T00:00:00Z" + }, + "value": { + "$id": "569", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 827 + } + } + }, + { + "$id": "570", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "571", + "timestamp": { + "$id": "572", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1975-11-01T00:00:00Z" + }, + "value": { + "$id": "573", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 797 + } + } + }, + { + "$id": "574", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "575", + "timestamp": { + "$id": "576", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1975-12-01T00:00:00Z" + }, + "value": { + "$id": "577", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 843 + } + } + } + ] + }, + "maxAnomalyRatio": { + "$id": "578", + "kind": "number", + "type": { + "$ref": "231" + }, + "value": 0.25 + }, + "sensitivity": { + "$id": "579", + "kind": "number", + "type": { + "$ref": "233" + }, + "value": 95 + }, + "granularity": { + "$id": "580", + "kind": "string", + "type": { + "$ref": "29" + }, + "value": "monthly" + }, + "imputeMode": { + "$id": "581", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "auto" + } + } + } + } + ] + } + ] + }, + { + "$id": "582", + "Name": "DetectUnivariateLastPoint", + "ResourceName": "Univariate", + "Summary": "Detect anomaly status of the latest point in time series.", + "Description": "This operation generates a model using the points that you sent into the API,\nand based on all data to determine whether the last point is anomalous.", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "314" + }, + { + "$ref": "316" + }, + { + "$id": "583", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "584", + "Kind": "constant", + "ValueType": { + "$id": "585", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "Value": "application/json", + "Decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [] + }, + { + "$id": "586", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "587", + "Kind": "constant", + "ValueType": { + "$id": "588", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "Value": "application/json", + "Decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [] + }, + { + "$id": "589", + "Name": "options", + "NameInRequest": "options", + "Description": "Method of univariate anomaly detection.", + "Type": { + "$ref": "216" + }, + "Location": "Body", + "IsApiVersion": false, + "IsContentType": false, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Method", + "Decorators": [] + } + ], + "Responses": [ + { + "$id": "590", + "StatusCodes": [ + 200 + ], + "BodyType": { + "$ref": "265" + }, + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{Endpoint}/anomalydetector/{ApiVersion}", + "Path": "/timeseries/last/detect", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "AnomalyDetector.Univariate.DetectUnivariateLastPoint", + "Decorators": [], + "Examples": [ + { + "$id": "591", + "kind": "http", + "name": "Detect univariate last point", + "description": "Detect univariate last point", + "filePath": "v1.1/LastDetect.json", + "rawExample": { + "$id": "592", + "operationId": "Univariate_DetectUnivariateLastPoint", + "title": "Detect univariate last point", + "parameters": { + "$id": "593", + "Endpoint": "{Endpoint}", + "ApiVersion": "v1.1", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "options": { + "$id": "594", + "series": [ + { + "$id": "595", + "timestamp": "1972-01-01T00:00:00Z", + "value": 826 + }, + { + "$id": "596", + "timestamp": "1972-02-01T00:00:00Z", + "value": 799 + }, + { + "$id": "597", + "timestamp": "1972-03-01T00:00:00Z", + "value": 890 + }, + { + "$id": "598", + "timestamp": "1972-04-01T00:00:00Z", + "value": 900 + }, + { + "$id": "599", + "timestamp": "1972-05-01T00:00:00Z", + "value": 961 + }, + { + "$id": "600", + "timestamp": "1972-06-01T00:00:00Z", + "value": 935 + }, + { + "$id": "601", + "timestamp": "1972-07-01T00:00:00Z", + "value": 894 + }, + { + "$id": "602", + "timestamp": "1972-08-01T00:00:00Z", + "value": 855 + }, + { + "$id": "603", + "timestamp": "1972-09-01T00:00:00Z", + "value": 809 + }, + { + "$id": "604", + "timestamp": "1972-10-01T00:00:00Z", + "value": 810 + }, + { + "$id": "605", + "timestamp": "1972-11-01T00:00:00Z", + "value": 766 + }, + { + "$id": "606", + "timestamp": "1972-12-01T00:00:00Z", + "value": 805 + }, + { + "$id": "607", + "timestamp": "1973-01-01T00:00:00Z", + "value": 821 + }, + { + "$id": "608", + "timestamp": "1973-02-01T00:00:00Z", + "value": 773 + }, + { + "$id": "609", + "timestamp": "1973-03-01T00:00:00Z", + "value": 883 + }, + { + "$id": "610", + "timestamp": "1973-04-01T00:00:00Z", + "value": 898 + }, + { + "$id": "611", + "timestamp": "1973-05-01T00:00:00Z", + "value": 957 + }, + { + "$id": "612", + "timestamp": "1973-06-01T00:00:00Z", + "value": 924 + }, + { + "$id": "613", + "timestamp": "1973-07-01T00:00:00Z", + "value": 881 + }, + { + "$id": "614", + "timestamp": "1973-08-01T00:00:00Z", + "value": 837 + }, + { + "$id": "615", + "timestamp": "1973-09-01T00:00:00Z", + "value": 784 + }, + { + "$id": "616", + "timestamp": "1973-10-01T00:00:00Z", + "value": 791 + }, + { + "$id": "617", + "timestamp": "1973-11-01T00:00:00Z", + "value": 760 + }, + { + "$id": "618", + "timestamp": "1973-12-01T00:00:00Z", + "value": 802 + }, + { + "$id": "619", + "timestamp": "1974-01-01T00:00:00Z", + "value": 828 + }, + { + "$id": "620", + "timestamp": "1974-02-01T00:00:00Z", + "value": 1030 + }, + { + "$id": "621", + "timestamp": "1974-03-01T00:00:00Z", + "value": 889 + }, + { + "$id": "622", + "timestamp": "1974-04-01T00:00:00Z", + "value": 902 + }, + { + "$id": "623", + "timestamp": "1974-05-01T00:00:00Z", + "value": 969 + }, + { + "$id": "624", + "timestamp": "1974-06-01T00:00:00Z", + "value": 947 + }, + { + "$id": "625", + "timestamp": "1974-07-01T00:00:00Z", + "value": 908 + }, + { + "$id": "626", + "timestamp": "1974-08-01T00:00:00Z", + "value": 867 + }, + { + "$id": "627", + "timestamp": "1974-09-01T00:00:00Z", + "value": 815 + }, + { + "$id": "628", + "timestamp": "1974-10-01T00:00:00Z", + "value": 812 + }, + { + "$id": "629", + "timestamp": "1974-11-01T00:00:00Z", + "value": 773 + }, + { + "$id": "630", + "timestamp": "1974-12-01T00:00:00Z", + "value": 813 + }, + { + "$id": "631", + "timestamp": "1975-01-01T00:00:00Z", + "value": 834 + }, + { + "$id": "632", + "timestamp": "1975-02-01T00:00:00Z", + "value": 782 + }, + { + "$id": "633", + "timestamp": "1975-03-01T00:00:00Z", + "value": 892 + }, + { + "$id": "634", + "timestamp": "1975-04-01T00:00:00Z", + "value": 903 + }, + { + "$id": "635", + "timestamp": "1975-05-01T00:00:00Z", + "value": 966 + }, + { + "$id": "636", + "timestamp": "1975-06-01T00:00:00Z", + "value": 937 + }, + { + "$id": "637", + "timestamp": "1975-07-01T00:00:00Z", + "value": 896 + }, + { + "$id": "638", + "timestamp": "1975-08-01T00:00:00Z", + "value": 858 + }, + { + "$id": "639", + "timestamp": "1975-09-01T00:00:00Z", + "value": 817 + }, + { + "$id": "640", + "timestamp": "1975-10-01T00:00:00Z", + "value": 827 + }, + { + "$id": "641", + "timestamp": "1975-11-01T00:00:00Z", + "value": 797 + }, + { + "$id": "642", + "timestamp": "1975-12-01T00:00:00Z", + "value": 843 + } + ], + "maxAnomalyRatio": 0.25, + "sensitivity": 95, + "granularity": "monthly", + "imputeMode": "fixed", + "imputeFixedValue": 800 + } + }, + "responses": { + "200": { + "$id": "644", + "body": { + "$id": "645", + "isAnomaly": false, + "isPositiveAnomaly": false, + "isNegativeAnomaly": false, + "period": 12, + "expectedValue": 809.2328084659704, + "upperMargin": 40.46164042329852, + "lowerMargin": 40.46164042329852, + "suggestedWindow": 49, + "severity": 0 + } + }, + "$id": "643" + } + }, + "parameters": [ + { + "$id": "646", + "parameter": { + "$ref": "589" + }, + "value": { + "$id": "647", + "kind": "model", + "type": { + "$ref": "216" + }, + "value": { + "$id": "648", + "series": { + "$id": "649", + "kind": "array", + "type": { + "$ref": "218" + }, + "value": [ + { + "$id": "650", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "651", + "timestamp": { + "$id": "652", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1972-01-01T00:00:00Z" + }, + "value": { + "$id": "653", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 826 + } + } + }, + { + "$id": "654", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "655", + "timestamp": { + "$id": "656", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1972-02-01T00:00:00Z" + }, + "value": { + "$id": "657", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 799 + } + } + }, + { + "$id": "658", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "659", + "timestamp": { + "$id": "660", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1972-03-01T00:00:00Z" + }, + "value": { + "$id": "661", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 890 + } + } + }, + { + "$id": "662", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "663", + "timestamp": { + "$id": "664", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1972-04-01T00:00:00Z" + }, + "value": { + "$id": "665", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 900 + } + } + }, + { + "$id": "666", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "667", + "timestamp": { + "$id": "668", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1972-05-01T00:00:00Z" + }, + "value": { + "$id": "669", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 961 + } + } + }, + { + "$id": "670", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "671", + "timestamp": { + "$id": "672", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1972-06-01T00:00:00Z" + }, + "value": { + "$id": "673", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 935 + } + } + }, + { + "$id": "674", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "675", + "timestamp": { + "$id": "676", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1972-07-01T00:00:00Z" + }, + "value": { + "$id": "677", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 894 + } + } + }, + { + "$id": "678", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "679", + "timestamp": { + "$id": "680", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1972-08-01T00:00:00Z" + }, + "value": { + "$id": "681", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 855 + } + } + }, + { + "$id": "682", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "683", + "timestamp": { + "$id": "684", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1972-09-01T00:00:00Z" + }, + "value": { + "$id": "685", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 809 + } + } + }, + { + "$id": "686", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "687", + "timestamp": { + "$id": "688", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1972-10-01T00:00:00Z" + }, + "value": { + "$id": "689", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 810 + } + } + }, + { + "$id": "690", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "691", + "timestamp": { + "$id": "692", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1972-11-01T00:00:00Z" + }, + "value": { + "$id": "693", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 766 + } + } + }, + { + "$id": "694", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "695", + "timestamp": { + "$id": "696", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1972-12-01T00:00:00Z" + }, + "value": { + "$id": "697", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 805 + } + } + }, + { + "$id": "698", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "699", + "timestamp": { + "$id": "700", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1973-01-01T00:00:00Z" + }, + "value": { + "$id": "701", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 821 + } + } + }, + { + "$id": "702", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "703", + "timestamp": { + "$id": "704", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1973-02-01T00:00:00Z" + }, + "value": { + "$id": "705", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 773 + } + } + }, + { + "$id": "706", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "707", + "timestamp": { + "$id": "708", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1973-03-01T00:00:00Z" + }, + "value": { + "$id": "709", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 883 + } + } + }, + { + "$id": "710", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "711", + "timestamp": { + "$id": "712", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1973-04-01T00:00:00Z" + }, + "value": { + "$id": "713", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 898 + } + } + }, + { + "$id": "714", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "715", + "timestamp": { + "$id": "716", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1973-05-01T00:00:00Z" + }, + "value": { + "$id": "717", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 957 + } + } + }, + { + "$id": "718", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "719", + "timestamp": { + "$id": "720", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1973-06-01T00:00:00Z" + }, + "value": { + "$id": "721", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 924 + } + } + }, + { + "$id": "722", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "723", + "timestamp": { + "$id": "724", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1973-07-01T00:00:00Z" + }, + "value": { + "$id": "725", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 881 + } + } + }, + { + "$id": "726", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "727", + "timestamp": { + "$id": "728", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1973-08-01T00:00:00Z" + }, + "value": { + "$id": "729", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 837 + } + } + }, + { + "$id": "730", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "731", + "timestamp": { + "$id": "732", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1973-09-01T00:00:00Z" + }, + "value": { + "$id": "733", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 784 + } + } + }, + { + "$id": "734", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "735", + "timestamp": { + "$id": "736", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1973-10-01T00:00:00Z" + }, + "value": { + "$id": "737", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 791 + } + } + }, + { + "$id": "738", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "739", + "timestamp": { + "$id": "740", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1973-11-01T00:00:00Z" + }, + "value": { + "$id": "741", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 760 + } + } + }, + { + "$id": "742", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "743", + "timestamp": { + "$id": "744", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1973-12-01T00:00:00Z" + }, + "value": { + "$id": "745", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 802 + } + } + }, + { + "$id": "746", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "747", + "timestamp": { + "$id": "748", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1974-01-01T00:00:00Z" + }, + "value": { + "$id": "749", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 828 + } + } + }, + { + "$id": "750", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "751", + "timestamp": { + "$id": "752", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1974-02-01T00:00:00Z" + }, + "value": { + "$id": "753", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1030 + } + } + }, + { + "$id": "754", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "755", + "timestamp": { + "$id": "756", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1974-03-01T00:00:00Z" + }, + "value": { + "$id": "757", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 889 + } + } + }, + { + "$id": "758", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "759", + "timestamp": { + "$id": "760", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1974-04-01T00:00:00Z" + }, + "value": { + "$id": "761", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 902 + } + } + }, + { + "$id": "762", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "763", + "timestamp": { + "$id": "764", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1974-05-01T00:00:00Z" + }, + "value": { + "$id": "765", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 969 + } + } + }, + { + "$id": "766", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "767", + "timestamp": { + "$id": "768", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1974-06-01T00:00:00Z" + }, + "value": { + "$id": "769", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 947 + } + } + }, + { + "$id": "770", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "771", + "timestamp": { + "$id": "772", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1974-07-01T00:00:00Z" + }, + "value": { + "$id": "773", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 908 + } + } + }, + { + "$id": "774", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "775", + "timestamp": { + "$id": "776", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1974-08-01T00:00:00Z" + }, + "value": { + "$id": "777", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 867 + } + } + }, + { + "$id": "778", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "779", + "timestamp": { + "$id": "780", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1974-09-01T00:00:00Z" + }, + "value": { + "$id": "781", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 815 + } + } + }, + { + "$id": "782", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "783", + "timestamp": { + "$id": "784", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1974-10-01T00:00:00Z" + }, + "value": { + "$id": "785", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 812 + } + } + }, + { + "$id": "786", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "787", + "timestamp": { + "$id": "788", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1974-11-01T00:00:00Z" + }, + "value": { + "$id": "789", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 773 + } + } + }, + { + "$id": "790", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "791", + "timestamp": { + "$id": "792", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1974-12-01T00:00:00Z" + }, + "value": { + "$id": "793", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 813 + } + } + }, + { + "$id": "794", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "795", + "timestamp": { + "$id": "796", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1975-01-01T00:00:00Z" + }, + "value": { + "$id": "797", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 834 + } + } + }, + { + "$id": "798", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "799", + "timestamp": { + "$id": "800", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1975-02-01T00:00:00Z" + }, + "value": { + "$id": "801", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 782 + } + } + }, + { + "$id": "802", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "803", + "timestamp": { + "$id": "804", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1975-03-01T00:00:00Z" + }, + "value": { + "$id": "805", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 892 + } + } + }, + { + "$id": "806", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "807", + "timestamp": { + "$id": "808", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1975-04-01T00:00:00Z" + }, + "value": { + "$id": "809", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 903 + } + } + }, + { + "$id": "810", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "811", + "timestamp": { + "$id": "812", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1975-05-01T00:00:00Z" + }, + "value": { + "$id": "813", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 966 + } + } + }, + { + "$id": "814", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "815", + "timestamp": { + "$id": "816", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1975-06-01T00:00:00Z" + }, + "value": { + "$id": "817", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 937 + } + } + }, + { + "$id": "818", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "819", + "timestamp": { + "$id": "820", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1975-07-01T00:00:00Z" + }, + "value": { + "$id": "821", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 896 + } + } + }, + { + "$id": "822", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "823", + "timestamp": { + "$id": "824", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1975-08-01T00:00:00Z" + }, + "value": { + "$id": "825", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 858 + } + } + }, + { + "$id": "826", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "827", + "timestamp": { + "$id": "828", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1975-09-01T00:00:00Z" + }, + "value": { + "$id": "829", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 817 + } + } + }, + { + "$id": "830", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "831", + "timestamp": { + "$id": "832", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1975-10-01T00:00:00Z" + }, + "value": { + "$id": "833", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 827 + } + } + }, + { + "$id": "834", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "835", + "timestamp": { + "$id": "836", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1975-11-01T00:00:00Z" + }, + "value": { + "$id": "837", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 797 + } + } + }, + { + "$id": "838", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "839", + "timestamp": { + "$id": "840", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "1975-12-01T00:00:00Z" + }, + "value": { + "$id": "841", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 843 + } + } + } + ] + }, + "maxAnomalyRatio": { + "$id": "842", + "kind": "number", + "type": { + "$ref": "231" + }, + "value": 0.25 + }, + "sensitivity": { + "$id": "843", + "kind": "number", + "type": { + "$ref": "233" + }, + "value": 95 + }, + "granularity": { + "$id": "844", + "kind": "string", + "type": { + "$ref": "29" + }, + "value": "monthly" + }, + "imputeMode": { + "$id": "845", + "kind": "string", + "type": { + "$ref": "40" + }, + "value": "fixed" + }, + "imputeFixedValue": { + "$id": "846", + "kind": "number", + "type": { + "$ref": "236" + }, + "value": 800 + } + } + } + } + ] + } + ] + }, + { + "$id": "847", + "Name": "DetectUnivariateChangePoint", + "ResourceName": "Univariate", + "Summary": "Detect change point for the entire series", + "Description": "Evaluate change point score of every series point", + "Accessibility": "public", + "Parameters": [ + { + "$ref": "314" + }, + { + "$ref": "316" + }, + { + "$id": "848", + "Name": "contentType", + "NameInRequest": "Content-Type", + "Description": "Body parameter's content type. Known values are application/json", + "Type": { + "$id": "849", + "Kind": "constant", + "ValueType": { + "$id": "850", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "Value": "application/json", + "Decorators": [] + }, + "Location": "Header", + "IsApiVersion": false, + "IsContentType": true, + "IsEndpoint": false, + "Explode": false, + "IsRequired": true, + "Kind": "Constant", + "Decorators": [] + }, + { + "$id": "851", + "Name": "accept", + "NameInRequest": "Accept", + "Type": { + "$id": "852", + "Kind": "constant", + "ValueType": { + "$id": "853", + "Kind": "string", + "Name": "string", + "CrossLanguageDefinitionId": "TypeSpec.string", + "Decorators": [] + }, + "Value": "application/json", + "Decorators": [] }, "Location": "Header", "IsApiVersion": false, @@ -2942,7 +6483,7 @@ "Decorators": [] }, { - "$id": "343", + "$id": "854", "Name": "options", "NameInRequest": "options", "Description": "Method of univariate anomaly detection.", @@ -2961,37 +6502,8630 @@ ], "Responses": [ { - "$id": "344", + "$id": "855", "StatusCodes": [ 200 ], "BodyType": { "$ref": "296" }, - "BodyMediaType": "Json", - "Headers": [], - "IsErrorResponse": false, - "ContentTypes": [ - "application/json" - ] - } - ], - "HttpMethod": "POST", - "RequestBodyMediaType": "Json", - "Uri": "{Endpoint}/anomalydetector/{ApiVersion}", - "Path": "/timeseries/changepoint/detect", - "RequestMediaTypes": [ - "application/json" - ], - "BufferResponse": true, - "GenerateProtocolMethod": true, - "GenerateConvenienceMethod": true, - "CrossLanguageDefinitionId": "AnomalyDetector.Univariate.DetectUnivariateChangePoint", - "Decorators": [] + "BodyMediaType": "Json", + "Headers": [], + "IsErrorResponse": false, + "ContentTypes": [ + "application/json" + ] + } + ], + "HttpMethod": "POST", + "RequestBodyMediaType": "Json", + "Uri": "{Endpoint}/anomalydetector/{ApiVersion}", + "Path": "/timeseries/changepoint/detect", + "RequestMediaTypes": [ + "application/json" + ], + "BufferResponse": true, + "GenerateProtocolMethod": true, + "GenerateConvenienceMethod": true, + "CrossLanguageDefinitionId": "AnomalyDetector.Univariate.DetectUnivariateChangePoint", + "Decorators": [], + "Examples": [ + { + "$id": "856", + "kind": "http", + "name": "Univariate detection of a change point", + "description": "Univariate detection of a change point", + "filePath": "v1.1/ChangePointDetect.json", + "rawExample": { + "$id": "857", + "operationId": "Univariate_DetectUnivariateChangePoint", + "title": "Univariate detection of a change point", + "parameters": { + "$id": "858", + "Endpoint": "{Endpoint}", + "ApiVersion": "v1.1", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "options": { + "$id": "859", + "series": [ + { + "$id": "860", + "timestamp": "2017-01-01T06:45:00Z", + "value": 1639196 + }, + { + "$id": "861", + "timestamp": "2017-01-01T06:50:00Z", + "value": 1639290 + }, + { + "$id": "862", + "timestamp": "2017-01-01T06:55:00Z", + "value": 1667293 + }, + { + "$id": "863", + "timestamp": "2017-01-01T07:00:00Z", + "value": 1703130 + }, + { + "$id": "864", + "timestamp": "2017-01-01T07:05:00Z", + "value": 1650912 + }, + { + "$id": "865", + "timestamp": "2017-01-01T07:10:00Z", + "value": 1653596 + }, + { + "$id": "866", + "timestamp": "2017-01-01T07:15:00Z", + "value": 1653793 + }, + { + "$id": "867", + "timestamp": "2017-01-01T07:20:00Z", + "value": 1653795 + }, + { + "$id": "868", + "timestamp": "2017-01-01T07:25:00Z", + "value": 1663471 + }, + { + "$id": "869", + "timestamp": "2017-01-01T07:30:00Z", + "value": 1662358 + }, + { + "$id": "870", + "timestamp": "2017-01-01T07:35:00Z", + "value": 1664320 + }, + { + "$id": "871", + "timestamp": "2017-01-01T07:40:00Z", + "value": 1664942 + }, + { + "$id": "872", + "timestamp": "2017-01-01T07:45:00Z", + "value": 1664966 + }, + { + "$id": "873", + "timestamp": "2017-01-01T07:50:00Z", + "value": 1724271 + }, + { + "$id": "874", + "timestamp": "2017-01-01T07:55:00Z", + "value": 1678720 + }, + { + "$id": "875", + "timestamp": "2017-01-01T08:00:00Z", + "value": 1672536 + }, + { + "$id": "876", + "timestamp": "2017-01-01T08:05:00Z", + "value": 1672544 + }, + { + "$id": "877", + "timestamp": "2017-01-01T08:10:00Z", + "value": 1672364 + }, + { + "$id": "878", + "timestamp": "2017-01-01T08:15:00Z", + "value": 1672912 + }, + { + "$id": "879", + "timestamp": "2017-01-01T08:20:00Z", + "value": 1672736 + }, + { + "$id": "880", + "timestamp": "2017-01-01T08:25:00Z", + "value": 1672725 + }, + { + "$id": "881", + "timestamp": "2017-01-01T08:30:00Z", + "value": 1673247 + }, + { + "$id": "882", + "timestamp": "2017-01-01T08:35:00Z", + "value": 1673109 + }, + { + "$id": "883", + "timestamp": "2017-01-01T08:40:00Z", + "value": 1690088 + }, + { + "$id": "884", + "timestamp": "2017-01-01T08:45:00Z", + "value": 1703865 + }, + { + "$id": "885", + "timestamp": "2017-01-01T08:50:00Z", + "value": 1703865 + }, + { + "$id": "886", + "timestamp": "2017-01-01T08:55:00Z", + "value": 1786581 + }, + { + "$id": "887", + "timestamp": "2017-01-01T09:00:00Z", + "value": 1800945 + }, + { + "$id": "888", + "timestamp": "2017-01-01T09:05:00Z", + "value": 1800957 + }, + { + "$id": "889", + "timestamp": "2017-01-01T09:10:00Z", + "value": 1801191 + }, + { + "$id": "890", + "timestamp": "2017-01-01T09:15:00Z", + "value": 1801412 + }, + { + "$id": "891", + "timestamp": "2017-01-01T09:20:00Z", + "value": 1801621 + }, + { + "$id": "892", + "timestamp": "2017-01-01T09:25:00Z", + "value": 1801621 + }, + { + "$id": "893", + "timestamp": "2017-01-01T09:30:00Z", + "value": 1801654 + }, + { + "$id": "894", + "timestamp": "2017-01-01T09:35:00Z", + "value": 1802105 + }, + { + "$id": "895", + "timestamp": "2017-01-01T09:40:00Z", + "value": 1801800 + }, + { + "$id": "896", + "timestamp": "2017-01-01T09:45:00Z", + "value": 1803040 + }, + { + "$id": "897", + "timestamp": "2017-01-01T09:50:00Z", + "value": 1803672 + }, + { + "$id": "898", + "timestamp": "2017-01-01T09:55:00Z", + "value": 1803535 + }, + { + "$id": "899", + "timestamp": "2017-01-01T10:00:00Z", + "value": 1803541 + }, + { + "$id": "900", + "timestamp": "2017-01-01T10:05:00Z", + "value": 1803545 + }, + { + "$id": "901", + "timestamp": "2017-01-01T10:10:00Z", + "value": 1803599 + }, + { + "$id": "902", + "timestamp": "2017-01-01T10:15:00Z", + "value": 1803616 + }, + { + "$id": "903", + "timestamp": "2017-01-01T10:20:00Z", + "value": 1803619 + }, + { + "$id": "904", + "timestamp": "2017-01-01T10:25:00Z", + "value": 1809942 + }, + { + "$id": "905", + "timestamp": "2017-01-01T10:30:00Z", + "value": 1802720 + }, + { + "$id": "906", + "timestamp": "2017-01-01T10:35:00Z", + "value": 1802720 + }, + { + "$id": "907", + "timestamp": "2017-01-01T10:40:00Z", + "value": 1802888 + }, + { + "$id": "908", + "timestamp": "2017-01-01T10:45:00Z", + "value": 1809574 + }, + { + "$id": "909", + "timestamp": "2017-01-01T10:50:00Z", + "value": 1803896 + }, + { + "$id": "910", + "timestamp": "2017-01-01T10:55:00Z", + "value": 1803850 + }, + { + "$id": "911", + "timestamp": "2017-01-01T11:00:00Z", + "value": 1803854 + }, + { + "$id": "912", + "timestamp": "2017-01-01T11:05:00Z", + "value": 1803854 + }, + { + "$id": "913", + "timestamp": "2017-01-01T11:10:00Z", + "value": 1803797 + }, + { + "$id": "914", + "timestamp": "2017-01-01T11:15:00Z", + "value": 1803921 + }, + { + "$id": "915", + "timestamp": "2017-01-01T11:20:00Z", + "value": 1803933 + }, + { + "$id": "916", + "timestamp": "2017-01-01T11:25:00Z", + "value": 1804040 + }, + { + "$id": "917", + "timestamp": "2017-01-01T11:30:00Z", + "value": 1804044 + }, + { + "$id": "918", + "timestamp": "2017-01-01T11:35:00Z", + "value": 1804070 + }, + { + "$id": "919", + "timestamp": "2017-01-01T11:40:00Z", + "value": 1804070 + }, + { + "$id": "920", + "timestamp": "2017-01-01T11:45:00Z", + "value": 1804068 + }, + { + "$id": "921", + "timestamp": "2017-01-01T11:50:00Z", + "value": 1804073 + }, + { + "$id": "922", + "timestamp": "2017-01-01T11:55:00Z", + "value": 1804101 + }, + { + "$id": "923", + "timestamp": "2017-01-01T12:00:00Z", + "value": 1804674 + }, + { + "$id": "924", + "timestamp": "2017-01-01T12:05:00Z", + "value": 1804714 + }, + { + "$id": "925", + "timestamp": "2017-01-01T12:10:00Z", + "value": 1804730 + }, + { + "$id": "926", + "timestamp": "2017-01-01T12:15:00Z", + "value": 1804816 + }, + { + "$id": "927", + "timestamp": "2017-01-01T12:20:00Z", + "value": 1803996 + }, + { + "$id": "928", + "timestamp": "2017-01-01T12:25:00Z", + "value": 1803998 + }, + { + "$id": "929", + "timestamp": "2017-01-01T12:30:00Z", + "value": 1804015 + }, + { + "$id": "930", + "timestamp": "2017-01-01T12:35:00Z", + "value": 1804047 + }, + { + "$id": "931", + "timestamp": "2017-01-01T12:40:00Z", + "value": 1804050 + }, + { + "$id": "932", + "timestamp": "2017-01-01T12:45:00Z", + "value": 1804218 + }, + { + "$id": "933", + "timestamp": "2017-01-01T12:50:00Z", + "value": 1804217 + }, + { + "$id": "934", + "timestamp": "2017-01-01T12:55:00Z", + "value": 1804217 + }, + { + "$id": "935", + "timestamp": "2017-01-01T13:00:00Z", + "value": 1804205 + }, + { + "$id": "936", + "timestamp": "2017-01-01T13:05:00Z", + "value": 1804728 + }, + { + "$id": "937", + "timestamp": "2017-01-01T13:10:00Z", + "value": 1804748 + }, + { + "$id": "938", + "timestamp": "2017-01-01T13:15:00Z", + "value": 1805232 + }, + { + "$id": "939", + "timestamp": "2017-01-01T13:20:00Z", + "value": 1814121 + }, + { + "$id": "940", + "timestamp": "2017-01-01T13:25:00Z", + "value": 1806789 + }, + { + "$id": "941", + "timestamp": "2017-01-01T13:30:00Z", + "value": 1806119 + }, + { + "$id": "942", + "timestamp": "2017-01-01T13:35:00Z", + "value": 1806329 + }, + { + "$id": "943", + "timestamp": "2017-01-01T13:40:00Z", + "value": 1806454 + }, + { + "$id": "944", + "timestamp": "2017-01-01T13:45:00Z", + "value": 1806852 + }, + { + "$id": "945", + "timestamp": "2017-01-01T13:50:00Z", + "value": 1807347 + }, + { + "$id": "946", + "timestamp": "2017-01-01T13:55:00Z", + "value": 1812144 + }, + { + "$id": "947", + "timestamp": "2017-01-01T14:00:00Z", + "value": 1807418 + }, + { + "$id": "948", + "timestamp": "2017-01-01T14:05:00Z", + "value": 1807418 + }, + { + "$id": "949", + "timestamp": "2017-01-01T14:10:00Z", + "value": 1807432 + }, + { + "$id": "950", + "timestamp": "2017-01-01T14:15:00Z", + "value": 1808540 + }, + { + "$id": "951", + "timestamp": "2017-01-01T14:20:00Z", + "value": 1808541 + }, + { + "$id": "952", + "timestamp": "2017-01-01T14:25:00Z", + "value": 1807831 + }, + { + "$id": "953", + "timestamp": "2017-01-01T14:30:00Z", + "value": 1807852 + }, + { + "$id": "954", + "timestamp": "2017-01-01T14:35:00Z", + "value": 1807811 + }, + { + "$id": "955", + "timestamp": "2017-01-01T14:40:00Z", + "value": 2214285 + }, + { + "$id": "956", + "timestamp": "2017-01-01T14:45:00Z", + "value": 2215019 + }, + { + "$id": "957", + "timestamp": "2017-01-01T14:50:00Z", + "value": 2215329 + }, + { + "$id": "958", + "timestamp": "2017-01-01T14:55:00Z", + "value": 2215097 + }, + { + "$id": "959", + "timestamp": "2017-01-01T15:00:00Z", + "value": 2215129 + }, + { + "$id": "960", + "timestamp": "2017-01-01T15:05:00Z", + "value": 2215120 + }, + { + "$id": "961", + "timestamp": "2017-01-01T15:10:00Z", + "value": 2217056 + }, + { + "$id": "962", + "timestamp": "2017-01-01T15:15:00Z", + "value": 2217056 + }, + { + "$id": "963", + "timestamp": "2017-01-01T15:20:00Z", + "value": 2222126 + }, + { + "$id": "964", + "timestamp": "2017-01-01T15:25:00Z", + "value": 2226472 + }, + { + "$id": "965", + "timestamp": "2017-01-01T15:30:00Z", + "value": 2226722 + }, + { + "$id": "966", + "timestamp": "2017-01-01T15:35:00Z", + "value": 2226729 + }, + { + "$id": "967", + "timestamp": "2017-01-01T15:40:00Z", + "value": 2226735 + }, + { + "$id": "968", + "timestamp": "2017-01-01T15:45:00Z", + "value": 2226735 + }, + { + "$id": "969", + "timestamp": "2017-01-01T15:50:00Z", + "value": 2226735 + }, + { + "$id": "970", + "timestamp": "2017-01-01T15:55:00Z", + "value": 2226952 + }, + { + "$id": "971", + "timestamp": "2017-01-01T16:00:00Z", + "value": 2226962 + }, + { + "$id": "972", + "timestamp": "2017-01-01T16:05:00Z", + "value": 2649337 + }, + { + "$id": "973", + "timestamp": "2017-01-01T16:10:00Z", + "value": 2092796 + }, + { + "$id": "974", + "timestamp": "2017-01-01T16:15:00Z", + "value": 2092839 + }, + { + "$id": "975", + "timestamp": "2017-01-01T16:20:00Z", + "value": 2092940 + }, + { + "$id": "976", + "timestamp": "2017-01-01T16:25:00Z", + "value": 2092940 + }, + { + "$id": "977", + "timestamp": "2017-01-01T16:30:00Z", + "value": 2092965 + }, + { + "$id": "978", + "timestamp": "2017-01-01T16:35:00Z", + "value": 2092979 + }, + { + "$id": "979", + "timestamp": "2017-01-01T16:40:00Z", + "value": 2095588 + }, + { + "$id": "980", + "timestamp": "2017-01-01T16:45:00Z", + "value": 2099586 + }, + { + "$id": "981", + "timestamp": "2017-01-01T16:50:00Z", + "value": 2102981 + }, + { + "$id": "982", + "timestamp": "2017-01-01T16:55:00Z", + "value": 2108053 + }, + { + "$id": "983", + "timestamp": "2017-01-01T17:00:00Z", + "value": 2107907 + }, + { + "$id": "984", + "timestamp": "2017-01-01T17:05:00Z", + "value": 2108241 + }, + { + "$id": "985", + "timestamp": "2017-01-01T17:10:00Z", + "value": 2100321 + }, + { + "$id": "986", + "timestamp": "2017-01-01T17:15:00Z", + "value": 2100448 + }, + { + "$id": "987", + "timestamp": "2017-01-01T17:20:00Z", + "value": 2100483 + }, + { + "$id": "988", + "timestamp": "2017-01-01T17:25:00Z", + "value": 2103042 + }, + { + "$id": "989", + "timestamp": "2017-01-01T17:30:00Z", + "value": 2103037 + }, + { + "$id": "990", + "timestamp": "2017-01-01T17:35:00Z", + "value": 2103040 + }, + { + "$id": "991", + "timestamp": "2017-01-01T17:40:00Z", + "value": 2103054 + }, + { + "$id": "992", + "timestamp": "2017-01-01T17:45:00Z", + "value": 2103058 + }, + { + "$id": "993", + "timestamp": "2017-01-01T17:50:00Z", + "value": 1830757 + }, + { + "$id": "994", + "timestamp": "2017-01-01T17:55:00Z", + "value": 1830855 + }, + { + "$id": "995", + "timestamp": "2017-01-01T18:00:00Z", + "value": 1831495 + }, + { + "$id": "996", + "timestamp": "2017-01-01T18:05:00Z", + "value": 1831463 + }, + { + "$id": "997", + "timestamp": "2017-01-01T18:10:00Z", + "value": 1831963 + }, + { + "$id": "998", + "timestamp": "2017-01-01T18:15:00Z", + "value": 1832046 + }, + { + "$id": "999", + "timestamp": "2017-01-01T18:20:00Z", + "value": 1832070 + }, + { + "$id": "1000", + "timestamp": "2017-01-01T18:25:00Z", + "value": 1835511 + }, + { + "$id": "1001", + "timestamp": "2017-01-01T18:30:00Z", + "value": 1835265 + }, + { + "$id": "1002", + "timestamp": "2017-01-01T18:35:00Z", + "value": 1835481 + }, + { + "$id": "1003", + "timestamp": "2017-01-01T18:40:00Z", + "value": 1835578 + }, + { + "$id": "1004", + "timestamp": "2017-01-01T18:45:00Z", + "value": 1835611 + }, + { + "$id": "1005", + "timestamp": "2017-01-01T18:50:00Z", + "value": 1836314 + }, + { + "$id": "1006", + "timestamp": "2017-01-01T18:55:00Z", + "value": 1836369 + }, + { + "$id": "1007", + "timestamp": "2017-01-01T19:00:00Z", + "value": 1837280 + }, + { + "$id": "1008", + "timestamp": "2017-01-01T19:05:00Z", + "value": 1842939 + }, + { + "$id": "1009", + "timestamp": "2017-01-01T19:10:00Z", + "value": 1843126 + }, + { + "$id": "1010", + "timestamp": "2017-01-01T19:15:00Z", + "value": 1845840 + }, + { + "$id": "1011", + "timestamp": "2017-01-01T19:20:00Z", + "value": 1842444 + }, + { + "$id": "1012", + "timestamp": "2017-01-01T19:25:00Z", + "value": 1839891 + }, + { + "$id": "1013", + "timestamp": "2017-01-01T19:30:00Z", + "value": 1839875 + }, + { + "$id": "1014", + "timestamp": "2017-01-01T19:35:00Z", + "value": 1839870 + }, + { + "$id": "1015", + "timestamp": "2017-01-01T19:40:00Z", + "value": 1840090 + }, + { + "$id": "1016", + "timestamp": "2017-01-01T19:45:00Z", + "value": 1840479 + }, + { + "$id": "1017", + "timestamp": "2017-01-01T19:50:00Z", + "value": 1840479 + }, + { + "$id": "1018", + "timestamp": "2017-01-01T19:55:00Z", + "value": 1840482 + }, + { + "$id": "1019", + "timestamp": "2017-01-01T20:00:00Z", + "value": 1841522 + }, + { + "$id": "1020", + "timestamp": "2017-01-01T20:05:00Z", + "value": 1841836 + }, + { + "$id": "1021", + "timestamp": "2017-01-01T20:10:00Z", + "value": 1842377 + }, + { + "$id": "1022", + "timestamp": "2017-01-01T20:15:00Z", + "value": 1842388 + }, + { + "$id": "1023", + "timestamp": "2017-01-01T20:20:00Z", + "value": 1842489 + }, + { + "$id": "1024", + "timestamp": "2017-01-01T20:25:00Z", + "value": 1842489 + }, + { + "$id": "1025", + "timestamp": "2017-01-01T20:30:00Z", + "value": 1842489 + }, + { + "$id": "1026", + "timestamp": "2017-01-01T20:35:00Z", + "value": 1842496 + }, + { + "$id": "1027", + "timestamp": "2017-01-01T20:40:00Z", + "value": 1842689 + }, + { + "$id": "1028", + "timestamp": "2017-01-01T20:45:00Z", + "value": 1843117 + }, + { + "$id": "1029", + "timestamp": "2017-01-01T20:50:00Z", + "value": 1843116 + }, + { + "$id": "1030", + "timestamp": "2017-01-01T20:55:00Z", + "value": 1843227 + }, + { + "$id": "1031", + "timestamp": "2017-01-01T21:00:00Z", + "value": 1843138 + }, + { + "$id": "1032", + "timestamp": "2017-01-01T21:05:00Z", + "value": 1843141 + }, + { + "$id": "1033", + "timestamp": "2017-01-01T21:10:00Z", + "value": 1843310 + }, + { + "$id": "1034", + "timestamp": "2017-01-01T21:15:00Z", + "value": 1843310 + }, + { + "$id": "1035", + "timestamp": "2017-01-01T21:20:00Z", + "value": 1843507 + }, + { + "$id": "1036", + "timestamp": "2017-01-01T21:25:00Z", + "value": 1843953 + }, + { + "$id": "1037", + "timestamp": "2017-01-01T21:30:00Z", + "value": 1844778 + }, + { + "$id": "1038", + "timestamp": "2017-01-01T21:35:00Z", + "value": 1843918 + }, + { + "$id": "1039", + "timestamp": "2017-01-01T21:40:00Z", + "value": 1882692 + }, + { + "$id": "1040", + "timestamp": "2017-01-01T21:45:00Z", + "value": 1974888 + }, + { + "$id": "1041", + "timestamp": "2017-01-01T21:50:00Z", + "value": 2157136 + }, + { + "$id": "1042", + "timestamp": "2017-01-01T21:55:00Z", + "value": 2154987 + }, + { + "$id": "1043", + "timestamp": "2017-01-01T22:00:00Z", + "value": 2155664 + }, + { + "$id": "1044", + "timestamp": "2017-01-01T22:05:00Z", + "value": 2155660 + }, + { + "$id": "1045", + "timestamp": "2017-01-01T22:10:00Z", + "value": 2155824 + }, + { + "$id": "1046", + "timestamp": "2017-01-01T22:15:00Z", + "value": 2155824 + }, + { + "$id": "1047", + "timestamp": "2017-01-01T22:20:00Z", + "value": 2156329 + }, + { + "$id": "1048", + "timestamp": "2017-01-01T22:25:00Z", + "value": 2156479 + }, + { + "$id": "1049", + "timestamp": "2017-01-01T22:30:00Z", + "value": 2165269 + }, + { + "$id": "1050", + "timestamp": "2017-01-01T22:35:00Z", + "value": 2165433 + }, + { + "$id": "1051", + "timestamp": "2017-01-01T22:40:00Z", + "value": 2165739 + }, + { + "$id": "1052", + "timestamp": "2017-01-01T22:45:00Z", + "value": 2165931 + }, + { + "$id": "1053", + "timestamp": "2017-01-01T22:50:00Z", + "value": 2165928 + }, + { + "$id": "1054", + "timestamp": "2017-01-01T22:55:00Z", + "value": 2165989 + }, + { + "$id": "1055", + "timestamp": "2017-01-01T23:00:00Z", + "value": 2228961 + }, + { + "$id": "1056", + "timestamp": "2017-01-01T23:05:00Z", + "value": 2228961 + }, + { + "$id": "1057", + "timestamp": "2017-01-01T23:10:00Z", + "value": 2228961 + }, + { + "$id": "1058", + "timestamp": "2017-01-01T23:15:00Z", + "value": 2485802 + }, + { + "$id": "1059", + "timestamp": "2017-01-01T23:20:00Z", + "value": 2485802 + }, + { + "$id": "1060", + "timestamp": "2017-01-01T23:25:00Z", + "value": 2486021 + }, + { + "$id": "1061", + "timestamp": "2017-01-01T23:30:00Z", + "value": 2485293 + }, + { + "$id": "1062", + "timestamp": "2017-01-01T23:35:00Z", + "value": 2485293 + }, + { + "$id": "1063", + "timestamp": "2017-01-01T23:40:00Z", + "value": 2485324 + }, + { + "$id": "1064", + "timestamp": "2017-01-01T23:45:00Z", + "value": 2489142 + }, + { + "$id": "1065", + "timestamp": "2017-01-01T23:50:00Z", + "value": 2526312 + }, + { + "$id": "1066", + "timestamp": "2017-01-01T23:55:00Z", + "value": 2526313 + }, + { + "$id": "1067", + "timestamp": "2017-01-02T00:00:00Z", + "value": 2526314 + }, + { + "$id": "1068", + "timestamp": "2017-01-02T00:05:00Z", + "value": 2526324 + }, + { + "$id": "1069", + "timestamp": "2017-01-02T00:10:00Z", + "value": 2526325 + }, + { + "$id": "1070", + "timestamp": "2017-01-02T00:15:00Z", + "value": 2526205 + }, + { + "$id": "1071", + "timestamp": "2017-01-02T00:20:00Z", + "value": 2526226 + }, + { + "$id": "1072", + "timestamp": "2017-01-02T00:25:00Z", + "value": 2526475 + }, + { + "$id": "1073", + "timestamp": "2017-01-02T00:30:00Z", + "value": 2526471 + }, + { + "$id": "1074", + "timestamp": "2017-01-02T00:35:00Z", + "value": 2526471 + }, + { + "$id": "1075", + "timestamp": "2017-01-02T00:40:00Z", + "value": 2526534 + }, + { + "$id": "1076", + "timestamp": "2017-01-02T00:45:00Z", + "value": 2526646 + }, + { + "$id": "1077", + "timestamp": "2017-01-02T00:50:00Z", + "value": 2526646 + }, + { + "$id": "1078", + "timestamp": "2017-01-02T00:55:00Z", + "value": 2526648 + }, + { + "$id": "1079", + "timestamp": "2017-01-02T01:00:00Z", + "value": 2526658 + }, + { + "$id": "1080", + "timestamp": "2017-01-02T01:05:00Z", + "value": 2526771 + }, + { + "$id": "1081", + "timestamp": "2017-01-02T01:10:00Z", + "value": 2526773 + }, + { + "$id": "1082", + "timestamp": "2017-01-02T01:15:00Z", + "value": 2526793 + }, + { + "$id": "1083", + "timestamp": "2017-01-02T01:20:00Z", + "value": 2527010 + }, + { + "$id": "1084", + "timestamp": "2017-01-02T01:25:00Z", + "value": 2527031 + }, + { + "$id": "1085", + "timestamp": "2017-01-02T01:30:00Z", + "value": 3178096 + }, + { + "$id": "1086", + "timestamp": "2017-01-02T01:35:00Z", + "value": 3196305 + }, + { + "$id": "1087", + "timestamp": "2017-01-02T01:40:00Z", + "value": 3196202 + }, + { + "$id": "1088", + "timestamp": "2017-01-02T01:45:00Z", + "value": 3196202 + }, + { + "$id": "1089", + "timestamp": "2017-01-02T01:50:00Z", + "value": 3196205 + }, + { + "$id": "1090", + "timestamp": "2017-01-02T01:55:00Z", + "value": 3229232 + }, + { + "$id": "1091", + "timestamp": "2017-01-02T02:00:00Z", + "value": 3230463 + }, + { + "$id": "1092", + "timestamp": "2017-01-02T02:05:00Z", + "value": 3230468 + }, + { + "$id": "1093", + "timestamp": "2017-01-02T02:10:00Z", + "value": 3230468 + }, + { + "$id": "1094", + "timestamp": "2017-01-02T02:15:00Z", + "value": 3230468 + }, + { + "$id": "1095", + "timestamp": "2017-01-02T02:20:00Z", + "value": 3230470 + }, + { + "$id": "1096", + "timestamp": "2017-01-02T02:25:00Z", + "value": 3230467 + }, + { + "$id": "1097", + "timestamp": "2017-01-02T02:30:00Z", + "value": 3230506 + }, + { + "$id": "1098", + "timestamp": "2017-01-02T02:35:00Z", + "value": 3231536 + }, + { + "$id": "1099", + "timestamp": "2017-01-02T02:40:00Z", + "value": 3230723 + }, + { + "$id": "1100", + "timestamp": "2017-01-02T02:45:00Z", + "value": 3230727 + }, + { + "$id": "1101", + "timestamp": "2017-01-02T02:50:00Z", + "value": 3230727 + }, + { + "$id": "1102", + "timestamp": "2017-01-02T02:55:00Z", + "value": 3230727 + }, + { + "$id": "1103", + "timestamp": "2017-01-02T03:00:00Z", + "value": 3231880 + }, + { + "$id": "1104", + "timestamp": "2017-01-02T03:05:00Z", + "value": 3232283 + }, + { + "$id": "1105", + "timestamp": "2017-01-02T03:10:00Z", + "value": 3232283 + }, + { + "$id": "1106", + "timestamp": "2017-01-02T03:15:00Z", + "value": 3232283 + }, + { + "$id": "1107", + "timestamp": "2017-01-02T03:20:00Z", + "value": 3232325 + }, + { + "$id": "1108", + "timestamp": "2017-01-02T03:25:00Z", + "value": 3232323 + }, + { + "$id": "1109", + "timestamp": "2017-01-02T03:30:00Z", + "value": 3232327 + }, + { + "$id": "1110", + "timestamp": "2017-01-02T03:35:00Z", + "value": 3232340 + }, + { + "$id": "1111", + "timestamp": "2017-01-02T03:40:00Z", + "value": 3232713 + }, + { + "$id": "1112", + "timestamp": "2017-01-02T03:45:00Z", + "value": 3232729 + }, + { + "$id": "1113", + "timestamp": "2017-01-02T03:50:00Z", + "value": 3232756 + }, + { + "$id": "1114", + "timestamp": "2017-01-02T03:55:00Z", + "value": 3233500 + }, + { + "$id": "1115", + "timestamp": "2017-01-02T04:00:00Z", + "value": 3233500 + }, + { + "$id": "1116", + "timestamp": "2017-01-02T04:05:00Z", + "value": 3233500 + } + ], + "granularity": "minutely", + "customInterval": 5, + "stableTrendWindow": 10, + "threshold": 0.99, + "period": 0 + } + }, + "responses": { + "200": { + "$id": "1118", + "body": { + "$id": "1119", + "period": 0, + "confidenceScores": [ + 0.11841763735063232, + 0.014857199927548581, + 0.0887032374955278, + 0.07430314751946857, + 0.059903057543409355, + 0.04132288981790399, + 0.022742722092391268, + 0.0005683208474757854, + 0.0216060803974397, + 0.053248991089971616, + 0.08489190178249614, + 0.04322511558132514, + 0.085336620199234, + 0.05876047041512903, + 0.02673755265447302, + 0.005032027060762012, + 0.031323171543775764, + 0.06299774949197792, + 0.08944723025337244, + 0.11523169864554421, + 0.14288453512268834, + 0.001592562559717675, + 0.32637788222282893, + 0, + 7.37310752217245e-15, + 2.211932256651735e-14, + 1, + 0.015697015891758138, + 0.01242773215043403, + 0.016188579169534697, + 0.019537751864826272, + 0.022506917491993753, + 0.01885762668253081, + 0.016253355310429398, + 0.017227483829906676, + 0.023236706002118527, + 0.03906277743439327, + 0.0354134866249377, + 0.037084294769315296, + 0.038248426822850935, + 0.050274427573818385, + 0.046815140298421175, + 0.043292518511668716, + 0.041353259508804745, + 0.038242312045861385, + 0.0346880230034313, + 0.032717096744889713, + 0.033026212895129546, + 0.031055286636580585, + 0.0275326648498355, + 0.023883374040372555, + 0.021564107969369743, + 0.018706498551854727, + 0.01543721481052325, + 0.015176320358565887, + 0.011527029549110314, + 0.008004407762357859, + 0.004355116952902286, + 0.0007058261434393403, + 0.0030701336887340946, + 0.006592755475479178, + 0.010147044517909256, + 0.013701333560339335, + 0.016780613767597707, + 0.020366570065705403, + 0.024015860875168354, + 0.02757014991759106, + 0.03033275756808058, + 0.03068865378707081, + 0.03395793752839492, + 0.03760722833785786, + 0.04122485189164318, + 0.030433874112103007, + 0.032816474694461056, + 0.03602242392443729, + 0.03960838022253762, + 0.04268766042980336, + 0.04633695123926631, + 0.0346592903007527, + 0.010219725324164698, + 0.007218892441326965, + 0.006909776291079754, + 0.000049463551460760754, + 0.0016047901503119819, + 0.01042121060065547, + 0.009020294944303705, + 0.005371004134840759, + 0.0021650549048718984, + 0.010517653997227793, + 0.0075017083013172925, + 0.00385241749186172, + 0.0008681390516288423, + 0.019005920148370017, + 0.015388296594592068, + 0.12583612799160215, + 1, + 0.005055878353042495, + 0.007613932468790628, + 0.011913685646822731, + 0.0166567804043268, + 0.015351429327405014, + 0.034309821169245976, + 0.0292817211106433, + 0.02425362105202589, + 0.019225520993423218, + 0.01419742093482055, + 0.00916932087621788, + 0.004141220817600464, + 0.0008868792410022057, + 0.0059149792996048755, + 0.010943079358207547, + 0.015971179416810213, + 0.02099927947542763, + 1, + 0.11533376425564247, + 0.1207645081246342, + 0.025174230145423273, + 0.09422487163021387, + 0.08417070843230404, + 0.07411654523437947, + 0.06406238203646963, + 0.0540082188385598, + 0.04395405564064997, + 0.03500824639144218, + 0.024954083193532338, + 0.014899919995622513, + 0.004845756797712681, + 0.005208406400211895, + 0.015262569598121728, + 0.025316732796031558, + 0.03537089599394139, + 0.045425059191865964, + 0.05145748091871777, + 1, + 0.011663506282381296, + 0.0043856580970499884, + 0.002892190088273945, + 0.01017003827359788, + 0.01744788645892181, + 0.024725734644253115, + 0.03200358282957705, + 0.03928143101490098, + 0.046559279200224915, + 0.05383712738555622, + 0.060069956133518614, + 0.0450857235774741, + 0.050621872700536176, + 0.029050850963546225, + 0.045689493056171517, + 0.0385699811492357, + 0.03179880905474635, + 0.03082274474926925, + 0.03586345902254038, + 0.028585610837209074, + 0.021402764418918006, + 0.04705886213832124, + 0.049724532235770696, + 0.05957866937203304, + 0.052649160999162954, + 0.045371312813839014, + 0.03809346462851508, + 0.030815616443183775, + 0.023537768257859845, + 0.01945831289597576, + 0.012180464710644455, + 0.00490261652532052, + 0.002153560870260057, + 0.0033196287098028916, + 0.0029244412792105113, + 0.0043217396504358, + 0.010934575466529664, + 0.018117421884820732, + 0.02267188608187652, + 0.027321352045957807, + 0.03459920023128174, + 0.03563859904812146, + 0.02990120514994264, + 0.03607069938654979, + 0.017223061637835352, + 7.37310752217245e-15, + 1.47462150443449e-14, + 1, + 0.046440552438977135, + 0.012233652454378385, + 0.017033155644526038, + 0.05136672465183527, + 0.06970832954194527, + 0.09929181019761117, + 0.11281999222473732, + 0.11039622919405537, + 0.08125609011787617, + 0.05661270134791935, + 0.028264243663680723, + 0.005974323576610399, + 0.038471191754617544, + 0, + 0, + 0, + 0.020288532128574968, + 0.005041879493223223, + 0.009223088216122232, + 0.009332792637570532, + 0.024579445272937026, + 0.03289096891488949, + 0.050695883419617865, + 1, + 0.000748013913075547, + 0.002186373999917361, + 0.0009330173541465358, + 0.00032033929162428933, + 0.0012886906362965138, + 0.002542047282052593, + 0.0007963481454318109, + 0.0004886757560166365, + 0.0016470306347398486, + 0.001063686451208582, + 0.0011980222832366648, + 0.00008700161821178273, + 0.0013086910082902394, + 0.0022770423529624643, + 0.000016333637160404937, + 0.0012053557529180517, + 0.0018570345408140537, + 0.0037297360397815314, + 0.003109724507563151, + 0.22869458705263188, + 0.2293374323429407, + 0.1140021204394844, + 0.0012381896969537412, + 0.11340677603264777, + 1, + 0.011793249472519423, + 0.008293225072094536, + 0.00469819890465153, + 0.0010715054815308995, + 0.0025551879416044767, + 0.006118546853369862, + 0.008605219072110835, + 0.0053601180131874334, + 0.008860142413597574, + 0.01248683583673295, + 0.01611352925985358, + 0.005878587160222206, + 0.013145429690188892, + 0.022280640305150038, + 0.01865394688201466, + 0.015027253458894031, + 0.012033905149325846, + 0.009040556839742916, + 0.005445530672299909, + 0.0018505045048569009, + 0.001744521662600853, + 0.005339547830043862, + 0.008760404091259945, + 0.012181260352490777, + 0.009902010591734853, + 0.007622760830993676 + ], + "isChangePoint": [ + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ] + } + }, + "$id": "1117" + } + }, + "parameters": [ + { + "$id": "1120", + "parameter": { + "$ref": "854" + }, + "value": { + "$id": "1121", + "kind": "model", + "type": { + "$ref": "284" + }, + "value": { + "$id": "1122", + "series": { + "$id": "1123", + "kind": "array", + "type": { + "$ref": "286" + }, + "value": [ + { + "$id": "1124", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1125", + "timestamp": { + "$id": "1126", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T06:45:00Z" + }, + "value": { + "$id": "1127", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1639196 + } + } + }, + { + "$id": "1128", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1129", + "timestamp": { + "$id": "1130", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T06:50:00Z" + }, + "value": { + "$id": "1131", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1639290 + } + } + }, + { + "$id": "1132", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1133", + "timestamp": { + "$id": "1134", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T06:55:00Z" + }, + "value": { + "$id": "1135", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1667293 + } + } + }, + { + "$id": "1136", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1137", + "timestamp": { + "$id": "1138", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T07:00:00Z" + }, + "value": { + "$id": "1139", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1703130 + } + } + }, + { + "$id": "1140", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1141", + "timestamp": { + "$id": "1142", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T07:05:00Z" + }, + "value": { + "$id": "1143", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1650912 + } + } + }, + { + "$id": "1144", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1145", + "timestamp": { + "$id": "1146", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T07:10:00Z" + }, + "value": { + "$id": "1147", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1653596 + } + } + }, + { + "$id": "1148", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1149", + "timestamp": { + "$id": "1150", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T07:15:00Z" + }, + "value": { + "$id": "1151", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1653793 + } + } + }, + { + "$id": "1152", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1153", + "timestamp": { + "$id": "1154", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T07:20:00Z" + }, + "value": { + "$id": "1155", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1653795 + } + } + }, + { + "$id": "1156", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1157", + "timestamp": { + "$id": "1158", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T07:25:00Z" + }, + "value": { + "$id": "1159", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1663471 + } + } + }, + { + "$id": "1160", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1161", + "timestamp": { + "$id": "1162", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T07:30:00Z" + }, + "value": { + "$id": "1163", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1662358 + } + } + }, + { + "$id": "1164", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1165", + "timestamp": { + "$id": "1166", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T07:35:00Z" + }, + "value": { + "$id": "1167", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1664320 + } + } + }, + { + "$id": "1168", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1169", + "timestamp": { + "$id": "1170", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T07:40:00Z" + }, + "value": { + "$id": "1171", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1664942 + } + } + }, + { + "$id": "1172", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1173", + "timestamp": { + "$id": "1174", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T07:45:00Z" + }, + "value": { + "$id": "1175", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1664966 + } + } + }, + { + "$id": "1176", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1177", + "timestamp": { + "$id": "1178", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T07:50:00Z" + }, + "value": { + "$id": "1179", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1724271 + } + } + }, + { + "$id": "1180", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1181", + "timestamp": { + "$id": "1182", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T07:55:00Z" + }, + "value": { + "$id": "1183", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1678720 + } + } + }, + { + "$id": "1184", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1185", + "timestamp": { + "$id": "1186", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T08:00:00Z" + }, + "value": { + "$id": "1187", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1672536 + } + } + }, + { + "$id": "1188", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1189", + "timestamp": { + "$id": "1190", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T08:05:00Z" + }, + "value": { + "$id": "1191", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1672544 + } + } + }, + { + "$id": "1192", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1193", + "timestamp": { + "$id": "1194", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T08:10:00Z" + }, + "value": { + "$id": "1195", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1672364 + } + } + }, + { + "$id": "1196", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1197", + "timestamp": { + "$id": "1198", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T08:15:00Z" + }, + "value": { + "$id": "1199", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1672912 + } + } + }, + { + "$id": "1200", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1201", + "timestamp": { + "$id": "1202", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T08:20:00Z" + }, + "value": { + "$id": "1203", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1672736 + } + } + }, + { + "$id": "1204", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1205", + "timestamp": { + "$id": "1206", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T08:25:00Z" + }, + "value": { + "$id": "1207", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1672725 + } + } + }, + { + "$id": "1208", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1209", + "timestamp": { + "$id": "1210", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T08:30:00Z" + }, + "value": { + "$id": "1211", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1673247 + } + } + }, + { + "$id": "1212", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1213", + "timestamp": { + "$id": "1214", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T08:35:00Z" + }, + "value": { + "$id": "1215", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1673109 + } + } + }, + { + "$id": "1216", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1217", + "timestamp": { + "$id": "1218", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T08:40:00Z" + }, + "value": { + "$id": "1219", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1690088 + } + } + }, + { + "$id": "1220", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1221", + "timestamp": { + "$id": "1222", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T08:45:00Z" + }, + "value": { + "$id": "1223", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1703865 + } + } + }, + { + "$id": "1224", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1225", + "timestamp": { + "$id": "1226", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T08:50:00Z" + }, + "value": { + "$id": "1227", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1703865 + } + } + }, + { + "$id": "1228", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1229", + "timestamp": { + "$id": "1230", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T08:55:00Z" + }, + "value": { + "$id": "1231", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1786581 + } + } + }, + { + "$id": "1232", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1233", + "timestamp": { + "$id": "1234", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T09:00:00Z" + }, + "value": { + "$id": "1235", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1800945 + } + } + }, + { + "$id": "1236", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1237", + "timestamp": { + "$id": "1238", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T09:05:00Z" + }, + "value": { + "$id": "1239", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1800957 + } + } + }, + { + "$id": "1240", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1241", + "timestamp": { + "$id": "1242", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T09:10:00Z" + }, + "value": { + "$id": "1243", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1801191 + } + } + }, + { + "$id": "1244", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1245", + "timestamp": { + "$id": "1246", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T09:15:00Z" + }, + "value": { + "$id": "1247", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1801412 + } + } + }, + { + "$id": "1248", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1249", + "timestamp": { + "$id": "1250", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T09:20:00Z" + }, + "value": { + "$id": "1251", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1801621 + } + } + }, + { + "$id": "1252", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1253", + "timestamp": { + "$id": "1254", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T09:25:00Z" + }, + "value": { + "$id": "1255", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1801621 + } + } + }, + { + "$id": "1256", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1257", + "timestamp": { + "$id": "1258", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T09:30:00Z" + }, + "value": { + "$id": "1259", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1801654 + } + } + }, + { + "$id": "1260", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1261", + "timestamp": { + "$id": "1262", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T09:35:00Z" + }, + "value": { + "$id": "1263", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1802105 + } + } + }, + { + "$id": "1264", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1265", + "timestamp": { + "$id": "1266", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T09:40:00Z" + }, + "value": { + "$id": "1267", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1801800 + } + } + }, + { + "$id": "1268", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1269", + "timestamp": { + "$id": "1270", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T09:45:00Z" + }, + "value": { + "$id": "1271", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1803040 + } + } + }, + { + "$id": "1272", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1273", + "timestamp": { + "$id": "1274", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T09:50:00Z" + }, + "value": { + "$id": "1275", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1803672 + } + } + }, + { + "$id": "1276", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1277", + "timestamp": { + "$id": "1278", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T09:55:00Z" + }, + "value": { + "$id": "1279", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1803535 + } + } + }, + { + "$id": "1280", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1281", + "timestamp": { + "$id": "1282", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T10:00:00Z" + }, + "value": { + "$id": "1283", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1803541 + } + } + }, + { + "$id": "1284", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1285", + "timestamp": { + "$id": "1286", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T10:05:00Z" + }, + "value": { + "$id": "1287", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1803545 + } + } + }, + { + "$id": "1288", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1289", + "timestamp": { + "$id": "1290", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T10:10:00Z" + }, + "value": { + "$id": "1291", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1803599 + } + } + }, + { + "$id": "1292", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1293", + "timestamp": { + "$id": "1294", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T10:15:00Z" + }, + "value": { + "$id": "1295", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1803616 + } + } + }, + { + "$id": "1296", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1297", + "timestamp": { + "$id": "1298", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T10:20:00Z" + }, + "value": { + "$id": "1299", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1803619 + } + } + }, + { + "$id": "1300", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1301", + "timestamp": { + "$id": "1302", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T10:25:00Z" + }, + "value": { + "$id": "1303", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1809942 + } + } + }, + { + "$id": "1304", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1305", + "timestamp": { + "$id": "1306", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T10:30:00Z" + }, + "value": { + "$id": "1307", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1802720 + } + } + }, + { + "$id": "1308", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1309", + "timestamp": { + "$id": "1310", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T10:35:00Z" + }, + "value": { + "$id": "1311", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1802720 + } + } + }, + { + "$id": "1312", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1313", + "timestamp": { + "$id": "1314", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T10:40:00Z" + }, + "value": { + "$id": "1315", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1802888 + } + } + }, + { + "$id": "1316", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1317", + "timestamp": { + "$id": "1318", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T10:45:00Z" + }, + "value": { + "$id": "1319", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1809574 + } + } + }, + { + "$id": "1320", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1321", + "timestamp": { + "$id": "1322", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T10:50:00Z" + }, + "value": { + "$id": "1323", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1803896 + } + } + }, + { + "$id": "1324", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1325", + "timestamp": { + "$id": "1326", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T10:55:00Z" + }, + "value": { + "$id": "1327", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1803850 + } + } + }, + { + "$id": "1328", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1329", + "timestamp": { + "$id": "1330", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T11:00:00Z" + }, + "value": { + "$id": "1331", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1803854 + } + } + }, + { + "$id": "1332", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1333", + "timestamp": { + "$id": "1334", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T11:05:00Z" + }, + "value": { + "$id": "1335", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1803854 + } + } + }, + { + "$id": "1336", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1337", + "timestamp": { + "$id": "1338", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T11:10:00Z" + }, + "value": { + "$id": "1339", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1803797 + } + } + }, + { + "$id": "1340", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1341", + "timestamp": { + "$id": "1342", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T11:15:00Z" + }, + "value": { + "$id": "1343", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1803921 + } + } + }, + { + "$id": "1344", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1345", + "timestamp": { + "$id": "1346", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T11:20:00Z" + }, + "value": { + "$id": "1347", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1803933 + } + } + }, + { + "$id": "1348", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1349", + "timestamp": { + "$id": "1350", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T11:25:00Z" + }, + "value": { + "$id": "1351", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1804040 + } + } + }, + { + "$id": "1352", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1353", + "timestamp": { + "$id": "1354", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T11:30:00Z" + }, + "value": { + "$id": "1355", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1804044 + } + } + }, + { + "$id": "1356", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1357", + "timestamp": { + "$id": "1358", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T11:35:00Z" + }, + "value": { + "$id": "1359", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1804070 + } + } + }, + { + "$id": "1360", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1361", + "timestamp": { + "$id": "1362", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T11:40:00Z" + }, + "value": { + "$id": "1363", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1804070 + } + } + }, + { + "$id": "1364", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1365", + "timestamp": { + "$id": "1366", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T11:45:00Z" + }, + "value": { + "$id": "1367", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1804068 + } + } + }, + { + "$id": "1368", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1369", + "timestamp": { + "$id": "1370", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T11:50:00Z" + }, + "value": { + "$id": "1371", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1804073 + } + } + }, + { + "$id": "1372", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1373", + "timestamp": { + "$id": "1374", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T11:55:00Z" + }, + "value": { + "$id": "1375", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1804101 + } + } + }, + { + "$id": "1376", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1377", + "timestamp": { + "$id": "1378", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T12:00:00Z" + }, + "value": { + "$id": "1379", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1804674 + } + } + }, + { + "$id": "1380", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1381", + "timestamp": { + "$id": "1382", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T12:05:00Z" + }, + "value": { + "$id": "1383", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1804714 + } + } + }, + { + "$id": "1384", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1385", + "timestamp": { + "$id": "1386", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T12:10:00Z" + }, + "value": { + "$id": "1387", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1804730 + } + } + }, + { + "$id": "1388", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1389", + "timestamp": { + "$id": "1390", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T12:15:00Z" + }, + "value": { + "$id": "1391", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1804816 + } + } + }, + { + "$id": "1392", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1393", + "timestamp": { + "$id": "1394", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T12:20:00Z" + }, + "value": { + "$id": "1395", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1803996 + } + } + }, + { + "$id": "1396", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1397", + "timestamp": { + "$id": "1398", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T12:25:00Z" + }, + "value": { + "$id": "1399", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1803998 + } + } + }, + { + "$id": "1400", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1401", + "timestamp": { + "$id": "1402", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T12:30:00Z" + }, + "value": { + "$id": "1403", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1804015 + } + } + }, + { + "$id": "1404", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1405", + "timestamp": { + "$id": "1406", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T12:35:00Z" + }, + "value": { + "$id": "1407", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1804047 + } + } + }, + { + "$id": "1408", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1409", + "timestamp": { + "$id": "1410", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T12:40:00Z" + }, + "value": { + "$id": "1411", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1804050 + } + } + }, + { + "$id": "1412", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1413", + "timestamp": { + "$id": "1414", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T12:45:00Z" + }, + "value": { + "$id": "1415", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1804218 + } + } + }, + { + "$id": "1416", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1417", + "timestamp": { + "$id": "1418", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T12:50:00Z" + }, + "value": { + "$id": "1419", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1804217 + } + } + }, + { + "$id": "1420", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1421", + "timestamp": { + "$id": "1422", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T12:55:00Z" + }, + "value": { + "$id": "1423", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1804217 + } + } + }, + { + "$id": "1424", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1425", + "timestamp": { + "$id": "1426", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T13:00:00Z" + }, + "value": { + "$id": "1427", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1804205 + } + } + }, + { + "$id": "1428", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1429", + "timestamp": { + "$id": "1430", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T13:05:00Z" + }, + "value": { + "$id": "1431", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1804728 + } + } + }, + { + "$id": "1432", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1433", + "timestamp": { + "$id": "1434", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T13:10:00Z" + }, + "value": { + "$id": "1435", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1804748 + } + } + }, + { + "$id": "1436", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1437", + "timestamp": { + "$id": "1438", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T13:15:00Z" + }, + "value": { + "$id": "1439", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1805232 + } + } + }, + { + "$id": "1440", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1441", + "timestamp": { + "$id": "1442", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T13:20:00Z" + }, + "value": { + "$id": "1443", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1814121 + } + } + }, + { + "$id": "1444", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1445", + "timestamp": { + "$id": "1446", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T13:25:00Z" + }, + "value": { + "$id": "1447", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1806789 + } + } + }, + { + "$id": "1448", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1449", + "timestamp": { + "$id": "1450", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T13:30:00Z" + }, + "value": { + "$id": "1451", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1806119 + } + } + }, + { + "$id": "1452", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1453", + "timestamp": { + "$id": "1454", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T13:35:00Z" + }, + "value": { + "$id": "1455", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1806329 + } + } + }, + { + "$id": "1456", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1457", + "timestamp": { + "$id": "1458", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T13:40:00Z" + }, + "value": { + "$id": "1459", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1806454 + } + } + }, + { + "$id": "1460", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1461", + "timestamp": { + "$id": "1462", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T13:45:00Z" + }, + "value": { + "$id": "1463", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1806852 + } + } + }, + { + "$id": "1464", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1465", + "timestamp": { + "$id": "1466", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T13:50:00Z" + }, + "value": { + "$id": "1467", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1807347 + } + } + }, + { + "$id": "1468", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1469", + "timestamp": { + "$id": "1470", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T13:55:00Z" + }, + "value": { + "$id": "1471", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1812144 + } + } + }, + { + "$id": "1472", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1473", + "timestamp": { + "$id": "1474", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T14:00:00Z" + }, + "value": { + "$id": "1475", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1807418 + } + } + }, + { + "$id": "1476", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1477", + "timestamp": { + "$id": "1478", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T14:05:00Z" + }, + "value": { + "$id": "1479", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1807418 + } + } + }, + { + "$id": "1480", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1481", + "timestamp": { + "$id": "1482", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T14:10:00Z" + }, + "value": { + "$id": "1483", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1807432 + } + } + }, + { + "$id": "1484", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1485", + "timestamp": { + "$id": "1486", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T14:15:00Z" + }, + "value": { + "$id": "1487", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1808540 + } + } + }, + { + "$id": "1488", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1489", + "timestamp": { + "$id": "1490", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T14:20:00Z" + }, + "value": { + "$id": "1491", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1808541 + } + } + }, + { + "$id": "1492", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1493", + "timestamp": { + "$id": "1494", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T14:25:00Z" + }, + "value": { + "$id": "1495", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1807831 + } + } + }, + { + "$id": "1496", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1497", + "timestamp": { + "$id": "1498", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T14:30:00Z" + }, + "value": { + "$id": "1499", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1807852 + } + } + }, + { + "$id": "1500", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1501", + "timestamp": { + "$id": "1502", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T14:35:00Z" + }, + "value": { + "$id": "1503", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1807811 + } + } + }, + { + "$id": "1504", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1505", + "timestamp": { + "$id": "1506", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T14:40:00Z" + }, + "value": { + "$id": "1507", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2214285 + } + } + }, + { + "$id": "1508", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1509", + "timestamp": { + "$id": "1510", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T14:45:00Z" + }, + "value": { + "$id": "1511", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2215019 + } + } + }, + { + "$id": "1512", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1513", + "timestamp": { + "$id": "1514", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T14:50:00Z" + }, + "value": { + "$id": "1515", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2215329 + } + } + }, + { + "$id": "1516", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1517", + "timestamp": { + "$id": "1518", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T14:55:00Z" + }, + "value": { + "$id": "1519", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2215097 + } + } + }, + { + "$id": "1520", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1521", + "timestamp": { + "$id": "1522", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T15:00:00Z" + }, + "value": { + "$id": "1523", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2215129 + } + } + }, + { + "$id": "1524", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1525", + "timestamp": { + "$id": "1526", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T15:05:00Z" + }, + "value": { + "$id": "1527", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2215120 + } + } + }, + { + "$id": "1528", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1529", + "timestamp": { + "$id": "1530", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T15:10:00Z" + }, + "value": { + "$id": "1531", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2217056 + } + } + }, + { + "$id": "1532", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1533", + "timestamp": { + "$id": "1534", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T15:15:00Z" + }, + "value": { + "$id": "1535", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2217056 + } + } + }, + { + "$id": "1536", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1537", + "timestamp": { + "$id": "1538", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T15:20:00Z" + }, + "value": { + "$id": "1539", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2222126 + } + } + }, + { + "$id": "1540", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1541", + "timestamp": { + "$id": "1542", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T15:25:00Z" + }, + "value": { + "$id": "1543", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2226472 + } + } + }, + { + "$id": "1544", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1545", + "timestamp": { + "$id": "1546", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T15:30:00Z" + }, + "value": { + "$id": "1547", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2226722 + } + } + }, + { + "$id": "1548", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1549", + "timestamp": { + "$id": "1550", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T15:35:00Z" + }, + "value": { + "$id": "1551", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2226729 + } + } + }, + { + "$id": "1552", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1553", + "timestamp": { + "$id": "1554", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T15:40:00Z" + }, + "value": { + "$id": "1555", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2226735 + } + } + }, + { + "$id": "1556", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1557", + "timestamp": { + "$id": "1558", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T15:45:00Z" + }, + "value": { + "$id": "1559", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2226735 + } + } + }, + { + "$id": "1560", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1561", + "timestamp": { + "$id": "1562", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T15:50:00Z" + }, + "value": { + "$id": "1563", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2226735 + } + } + }, + { + "$id": "1564", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1565", + "timestamp": { + "$id": "1566", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T15:55:00Z" + }, + "value": { + "$id": "1567", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2226952 + } + } + }, + { + "$id": "1568", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1569", + "timestamp": { + "$id": "1570", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T16:00:00Z" + }, + "value": { + "$id": "1571", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2226962 + } + } + }, + { + "$id": "1572", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1573", + "timestamp": { + "$id": "1574", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T16:05:00Z" + }, + "value": { + "$id": "1575", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2649337 + } + } + }, + { + "$id": "1576", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1577", + "timestamp": { + "$id": "1578", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T16:10:00Z" + }, + "value": { + "$id": "1579", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2092796 + } + } + }, + { + "$id": "1580", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1581", + "timestamp": { + "$id": "1582", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T16:15:00Z" + }, + "value": { + "$id": "1583", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2092839 + } + } + }, + { + "$id": "1584", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1585", + "timestamp": { + "$id": "1586", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T16:20:00Z" + }, + "value": { + "$id": "1587", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2092940 + } + } + }, + { + "$id": "1588", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1589", + "timestamp": { + "$id": "1590", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T16:25:00Z" + }, + "value": { + "$id": "1591", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2092940 + } + } + }, + { + "$id": "1592", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1593", + "timestamp": { + "$id": "1594", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T16:30:00Z" + }, + "value": { + "$id": "1595", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2092965 + } + } + }, + { + "$id": "1596", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1597", + "timestamp": { + "$id": "1598", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T16:35:00Z" + }, + "value": { + "$id": "1599", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2092979 + } + } + }, + { + "$id": "1600", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1601", + "timestamp": { + "$id": "1602", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T16:40:00Z" + }, + "value": { + "$id": "1603", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2095588 + } + } + }, + { + "$id": "1604", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1605", + "timestamp": { + "$id": "1606", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T16:45:00Z" + }, + "value": { + "$id": "1607", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2099586 + } + } + }, + { + "$id": "1608", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1609", + "timestamp": { + "$id": "1610", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T16:50:00Z" + }, + "value": { + "$id": "1611", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2102981 + } + } + }, + { + "$id": "1612", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1613", + "timestamp": { + "$id": "1614", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T16:55:00Z" + }, + "value": { + "$id": "1615", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2108053 + } + } + }, + { + "$id": "1616", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1617", + "timestamp": { + "$id": "1618", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T17:00:00Z" + }, + "value": { + "$id": "1619", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2107907 + } + } + }, + { + "$id": "1620", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1621", + "timestamp": { + "$id": "1622", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T17:05:00Z" + }, + "value": { + "$id": "1623", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2108241 + } + } + }, + { + "$id": "1624", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1625", + "timestamp": { + "$id": "1626", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T17:10:00Z" + }, + "value": { + "$id": "1627", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2100321 + } + } + }, + { + "$id": "1628", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1629", + "timestamp": { + "$id": "1630", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T17:15:00Z" + }, + "value": { + "$id": "1631", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2100448 + } + } + }, + { + "$id": "1632", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1633", + "timestamp": { + "$id": "1634", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T17:20:00Z" + }, + "value": { + "$id": "1635", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2100483 + } + } + }, + { + "$id": "1636", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1637", + "timestamp": { + "$id": "1638", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T17:25:00Z" + }, + "value": { + "$id": "1639", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2103042 + } + } + }, + { + "$id": "1640", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1641", + "timestamp": { + "$id": "1642", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T17:30:00Z" + }, + "value": { + "$id": "1643", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2103037 + } + } + }, + { + "$id": "1644", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1645", + "timestamp": { + "$id": "1646", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T17:35:00Z" + }, + "value": { + "$id": "1647", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2103040 + } + } + }, + { + "$id": "1648", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1649", + "timestamp": { + "$id": "1650", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T17:40:00Z" + }, + "value": { + "$id": "1651", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2103054 + } + } + }, + { + "$id": "1652", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1653", + "timestamp": { + "$id": "1654", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T17:45:00Z" + }, + "value": { + "$id": "1655", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2103058 + } + } + }, + { + "$id": "1656", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1657", + "timestamp": { + "$id": "1658", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T17:50:00Z" + }, + "value": { + "$id": "1659", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1830757 + } + } + }, + { + "$id": "1660", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1661", + "timestamp": { + "$id": "1662", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T17:55:00Z" + }, + "value": { + "$id": "1663", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1830855 + } + } + }, + { + "$id": "1664", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1665", + "timestamp": { + "$id": "1666", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T18:00:00Z" + }, + "value": { + "$id": "1667", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1831495 + } + } + }, + { + "$id": "1668", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1669", + "timestamp": { + "$id": "1670", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T18:05:00Z" + }, + "value": { + "$id": "1671", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1831463 + } + } + }, + { + "$id": "1672", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1673", + "timestamp": { + "$id": "1674", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T18:10:00Z" + }, + "value": { + "$id": "1675", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1831963 + } + } + }, + { + "$id": "1676", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1677", + "timestamp": { + "$id": "1678", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T18:15:00Z" + }, + "value": { + "$id": "1679", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1832046 + } + } + }, + { + "$id": "1680", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1681", + "timestamp": { + "$id": "1682", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T18:20:00Z" + }, + "value": { + "$id": "1683", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1832070 + } + } + }, + { + "$id": "1684", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1685", + "timestamp": { + "$id": "1686", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T18:25:00Z" + }, + "value": { + "$id": "1687", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1835511 + } + } + }, + { + "$id": "1688", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1689", + "timestamp": { + "$id": "1690", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T18:30:00Z" + }, + "value": { + "$id": "1691", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1835265 + } + } + }, + { + "$id": "1692", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1693", + "timestamp": { + "$id": "1694", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T18:35:00Z" + }, + "value": { + "$id": "1695", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1835481 + } + } + }, + { + "$id": "1696", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1697", + "timestamp": { + "$id": "1698", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T18:40:00Z" + }, + "value": { + "$id": "1699", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1835578 + } + } + }, + { + "$id": "1700", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1701", + "timestamp": { + "$id": "1702", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T18:45:00Z" + }, + "value": { + "$id": "1703", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1835611 + } + } + }, + { + "$id": "1704", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1705", + "timestamp": { + "$id": "1706", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T18:50:00Z" + }, + "value": { + "$id": "1707", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1836314 + } + } + }, + { + "$id": "1708", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1709", + "timestamp": { + "$id": "1710", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T18:55:00Z" + }, + "value": { + "$id": "1711", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1836369 + } + } + }, + { + "$id": "1712", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1713", + "timestamp": { + "$id": "1714", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T19:00:00Z" + }, + "value": { + "$id": "1715", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1837280 + } + } + }, + { + "$id": "1716", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1717", + "timestamp": { + "$id": "1718", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T19:05:00Z" + }, + "value": { + "$id": "1719", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1842939 + } + } + }, + { + "$id": "1720", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1721", + "timestamp": { + "$id": "1722", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T19:10:00Z" + }, + "value": { + "$id": "1723", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1843126 + } + } + }, + { + "$id": "1724", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1725", + "timestamp": { + "$id": "1726", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T19:15:00Z" + }, + "value": { + "$id": "1727", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1845840 + } + } + }, + { + "$id": "1728", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1729", + "timestamp": { + "$id": "1730", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T19:20:00Z" + }, + "value": { + "$id": "1731", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1842444 + } + } + }, + { + "$id": "1732", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1733", + "timestamp": { + "$id": "1734", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T19:25:00Z" + }, + "value": { + "$id": "1735", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1839891 + } + } + }, + { + "$id": "1736", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1737", + "timestamp": { + "$id": "1738", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T19:30:00Z" + }, + "value": { + "$id": "1739", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1839875 + } + } + }, + { + "$id": "1740", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1741", + "timestamp": { + "$id": "1742", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T19:35:00Z" + }, + "value": { + "$id": "1743", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1839870 + } + } + }, + { + "$id": "1744", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1745", + "timestamp": { + "$id": "1746", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T19:40:00Z" + }, + "value": { + "$id": "1747", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1840090 + } + } + }, + { + "$id": "1748", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1749", + "timestamp": { + "$id": "1750", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T19:45:00Z" + }, + "value": { + "$id": "1751", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1840479 + } + } + }, + { + "$id": "1752", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1753", + "timestamp": { + "$id": "1754", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T19:50:00Z" + }, + "value": { + "$id": "1755", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1840479 + } + } + }, + { + "$id": "1756", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1757", + "timestamp": { + "$id": "1758", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T19:55:00Z" + }, + "value": { + "$id": "1759", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1840482 + } + } + }, + { + "$id": "1760", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1761", + "timestamp": { + "$id": "1762", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T20:00:00Z" + }, + "value": { + "$id": "1763", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1841522 + } + } + }, + { + "$id": "1764", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1765", + "timestamp": { + "$id": "1766", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T20:05:00Z" + }, + "value": { + "$id": "1767", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1841836 + } + } + }, + { + "$id": "1768", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1769", + "timestamp": { + "$id": "1770", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T20:10:00Z" + }, + "value": { + "$id": "1771", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1842377 + } + } + }, + { + "$id": "1772", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1773", + "timestamp": { + "$id": "1774", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T20:15:00Z" + }, + "value": { + "$id": "1775", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1842388 + } + } + }, + { + "$id": "1776", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1777", + "timestamp": { + "$id": "1778", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T20:20:00Z" + }, + "value": { + "$id": "1779", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1842489 + } + } + }, + { + "$id": "1780", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1781", + "timestamp": { + "$id": "1782", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T20:25:00Z" + }, + "value": { + "$id": "1783", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1842489 + } + } + }, + { + "$id": "1784", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1785", + "timestamp": { + "$id": "1786", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T20:30:00Z" + }, + "value": { + "$id": "1787", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1842489 + } + } + }, + { + "$id": "1788", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1789", + "timestamp": { + "$id": "1790", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T20:35:00Z" + }, + "value": { + "$id": "1791", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1842496 + } + } + }, + { + "$id": "1792", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1793", + "timestamp": { + "$id": "1794", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T20:40:00Z" + }, + "value": { + "$id": "1795", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1842689 + } + } + }, + { + "$id": "1796", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1797", + "timestamp": { + "$id": "1798", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T20:45:00Z" + }, + "value": { + "$id": "1799", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1843117 + } + } + }, + { + "$id": "1800", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1801", + "timestamp": { + "$id": "1802", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T20:50:00Z" + }, + "value": { + "$id": "1803", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1843116 + } + } + }, + { + "$id": "1804", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1805", + "timestamp": { + "$id": "1806", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T20:55:00Z" + }, + "value": { + "$id": "1807", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1843227 + } + } + }, + { + "$id": "1808", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1809", + "timestamp": { + "$id": "1810", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T21:00:00Z" + }, + "value": { + "$id": "1811", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1843138 + } + } + }, + { + "$id": "1812", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1813", + "timestamp": { + "$id": "1814", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T21:05:00Z" + }, + "value": { + "$id": "1815", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1843141 + } + } + }, + { + "$id": "1816", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1817", + "timestamp": { + "$id": "1818", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T21:10:00Z" + }, + "value": { + "$id": "1819", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1843310 + } + } + }, + { + "$id": "1820", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1821", + "timestamp": { + "$id": "1822", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T21:15:00Z" + }, + "value": { + "$id": "1823", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1843310 + } + } + }, + { + "$id": "1824", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1825", + "timestamp": { + "$id": "1826", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T21:20:00Z" + }, + "value": { + "$id": "1827", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1843507 + } + } + }, + { + "$id": "1828", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1829", + "timestamp": { + "$id": "1830", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T21:25:00Z" + }, + "value": { + "$id": "1831", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1843953 + } + } + }, + { + "$id": "1832", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1833", + "timestamp": { + "$id": "1834", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T21:30:00Z" + }, + "value": { + "$id": "1835", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1844778 + } + } + }, + { + "$id": "1836", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1837", + "timestamp": { + "$id": "1838", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T21:35:00Z" + }, + "value": { + "$id": "1839", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1843918 + } + } + }, + { + "$id": "1840", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1841", + "timestamp": { + "$id": "1842", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T21:40:00Z" + }, + "value": { + "$id": "1843", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1882692 + } + } + }, + { + "$id": "1844", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1845", + "timestamp": { + "$id": "1846", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T21:45:00Z" + }, + "value": { + "$id": "1847", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 1974888 + } + } + }, + { + "$id": "1848", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1849", + "timestamp": { + "$id": "1850", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T21:50:00Z" + }, + "value": { + "$id": "1851", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2157136 + } + } + }, + { + "$id": "1852", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1853", + "timestamp": { + "$id": "1854", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T21:55:00Z" + }, + "value": { + "$id": "1855", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2154987 + } + } + }, + { + "$id": "1856", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1857", + "timestamp": { + "$id": "1858", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T22:00:00Z" + }, + "value": { + "$id": "1859", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2155664 + } + } + }, + { + "$id": "1860", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1861", + "timestamp": { + "$id": "1862", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T22:05:00Z" + }, + "value": { + "$id": "1863", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2155660 + } + } + }, + { + "$id": "1864", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1865", + "timestamp": { + "$id": "1866", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T22:10:00Z" + }, + "value": { + "$id": "1867", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2155824 + } + } + }, + { + "$id": "1868", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1869", + "timestamp": { + "$id": "1870", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T22:15:00Z" + }, + "value": { + "$id": "1871", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2155824 + } + } + }, + { + "$id": "1872", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1873", + "timestamp": { + "$id": "1874", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T22:20:00Z" + }, + "value": { + "$id": "1875", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2156329 + } + } + }, + { + "$id": "1876", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1877", + "timestamp": { + "$id": "1878", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T22:25:00Z" + }, + "value": { + "$id": "1879", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2156479 + } + } + }, + { + "$id": "1880", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1881", + "timestamp": { + "$id": "1882", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T22:30:00Z" + }, + "value": { + "$id": "1883", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2165269 + } + } + }, + { + "$id": "1884", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1885", + "timestamp": { + "$id": "1886", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T22:35:00Z" + }, + "value": { + "$id": "1887", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2165433 + } + } + }, + { + "$id": "1888", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1889", + "timestamp": { + "$id": "1890", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T22:40:00Z" + }, + "value": { + "$id": "1891", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2165739 + } + } + }, + { + "$id": "1892", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1893", + "timestamp": { + "$id": "1894", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T22:45:00Z" + }, + "value": { + "$id": "1895", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2165931 + } + } + }, + { + "$id": "1896", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1897", + "timestamp": { + "$id": "1898", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T22:50:00Z" + }, + "value": { + "$id": "1899", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2165928 + } + } + }, + { + "$id": "1900", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1901", + "timestamp": { + "$id": "1902", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T22:55:00Z" + }, + "value": { + "$id": "1903", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2165989 + } + } + }, + { + "$id": "1904", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1905", + "timestamp": { + "$id": "1906", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T23:00:00Z" + }, + "value": { + "$id": "1907", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2228961 + } + } + }, + { + "$id": "1908", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1909", + "timestamp": { + "$id": "1910", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T23:05:00Z" + }, + "value": { + "$id": "1911", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2228961 + } + } + }, + { + "$id": "1912", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1913", + "timestamp": { + "$id": "1914", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T23:10:00Z" + }, + "value": { + "$id": "1915", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2228961 + } + } + }, + { + "$id": "1916", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1917", + "timestamp": { + "$id": "1918", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T23:15:00Z" + }, + "value": { + "$id": "1919", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2485802 + } + } + }, + { + "$id": "1920", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1921", + "timestamp": { + "$id": "1922", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T23:20:00Z" + }, + "value": { + "$id": "1923", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2485802 + } + } + }, + { + "$id": "1924", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1925", + "timestamp": { + "$id": "1926", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T23:25:00Z" + }, + "value": { + "$id": "1927", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2486021 + } + } + }, + { + "$id": "1928", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1929", + "timestamp": { + "$id": "1930", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T23:30:00Z" + }, + "value": { + "$id": "1931", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2485293 + } + } + }, + { + "$id": "1932", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1933", + "timestamp": { + "$id": "1934", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T23:35:00Z" + }, + "value": { + "$id": "1935", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2485293 + } + } + }, + { + "$id": "1936", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1937", + "timestamp": { + "$id": "1938", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T23:40:00Z" + }, + "value": { + "$id": "1939", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2485324 + } + } + }, + { + "$id": "1940", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1941", + "timestamp": { + "$id": "1942", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T23:45:00Z" + }, + "value": { + "$id": "1943", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2489142 + } + } + }, + { + "$id": "1944", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1945", + "timestamp": { + "$id": "1946", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T23:50:00Z" + }, + "value": { + "$id": "1947", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2526312 + } + } + }, + { + "$id": "1948", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1949", + "timestamp": { + "$id": "1950", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-01T23:55:00Z" + }, + "value": { + "$id": "1951", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2526313 + } + } + }, + { + "$id": "1952", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1953", + "timestamp": { + "$id": "1954", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T00:00:00Z" + }, + "value": { + "$id": "1955", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2526314 + } + } + }, + { + "$id": "1956", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1957", + "timestamp": { + "$id": "1958", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T00:05:00Z" + }, + "value": { + "$id": "1959", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2526324 + } + } + }, + { + "$id": "1960", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1961", + "timestamp": { + "$id": "1962", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T00:10:00Z" + }, + "value": { + "$id": "1963", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2526325 + } + } + }, + { + "$id": "1964", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1965", + "timestamp": { + "$id": "1966", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T00:15:00Z" + }, + "value": { + "$id": "1967", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2526205 + } + } + }, + { + "$id": "1968", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1969", + "timestamp": { + "$id": "1970", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T00:20:00Z" + }, + "value": { + "$id": "1971", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2526226 + } + } + }, + { + "$id": "1972", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1973", + "timestamp": { + "$id": "1974", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T00:25:00Z" + }, + "value": { + "$id": "1975", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2526475 + } + } + }, + { + "$id": "1976", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1977", + "timestamp": { + "$id": "1978", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T00:30:00Z" + }, + "value": { + "$id": "1979", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2526471 + } + } + }, + { + "$id": "1980", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1981", + "timestamp": { + "$id": "1982", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T00:35:00Z" + }, + "value": { + "$id": "1983", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2526471 + } + } + }, + { + "$id": "1984", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1985", + "timestamp": { + "$id": "1986", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T00:40:00Z" + }, + "value": { + "$id": "1987", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2526534 + } + } + }, + { + "$id": "1988", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1989", + "timestamp": { + "$id": "1990", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T00:45:00Z" + }, + "value": { + "$id": "1991", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2526646 + } + } + }, + { + "$id": "1992", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1993", + "timestamp": { + "$id": "1994", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T00:50:00Z" + }, + "value": { + "$id": "1995", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2526646 + } + } + }, + { + "$id": "1996", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "1997", + "timestamp": { + "$id": "1998", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T00:55:00Z" + }, + "value": { + "$id": "1999", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2526648 + } + } + }, + { + "$id": "2000", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2001", + "timestamp": { + "$id": "2002", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T01:00:00Z" + }, + "value": { + "$id": "2003", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2526658 + } + } + }, + { + "$id": "2004", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2005", + "timestamp": { + "$id": "2006", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T01:05:00Z" + }, + "value": { + "$id": "2007", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2526771 + } + } + }, + { + "$id": "2008", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2009", + "timestamp": { + "$id": "2010", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T01:10:00Z" + }, + "value": { + "$id": "2011", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2526773 + } + } + }, + { + "$id": "2012", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2013", + "timestamp": { + "$id": "2014", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T01:15:00Z" + }, + "value": { + "$id": "2015", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2526793 + } + } + }, + { + "$id": "2016", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2017", + "timestamp": { + "$id": "2018", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T01:20:00Z" + }, + "value": { + "$id": "2019", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2527010 + } + } + }, + { + "$id": "2020", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2021", + "timestamp": { + "$id": "2022", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T01:25:00Z" + }, + "value": { + "$id": "2023", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 2527031 + } + } + }, + { + "$id": "2024", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2025", + "timestamp": { + "$id": "2026", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T01:30:00Z" + }, + "value": { + "$id": "2027", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3178096 + } + } + }, + { + "$id": "2028", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2029", + "timestamp": { + "$id": "2030", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T01:35:00Z" + }, + "value": { + "$id": "2031", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3196305 + } + } + }, + { + "$id": "2032", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2033", + "timestamp": { + "$id": "2034", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T01:40:00Z" + }, + "value": { + "$id": "2035", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3196202 + } + } + }, + { + "$id": "2036", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2037", + "timestamp": { + "$id": "2038", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T01:45:00Z" + }, + "value": { + "$id": "2039", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3196202 + } + } + }, + { + "$id": "2040", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2041", + "timestamp": { + "$id": "2042", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T01:50:00Z" + }, + "value": { + "$id": "2043", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3196205 + } + } + }, + { + "$id": "2044", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2045", + "timestamp": { + "$id": "2046", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T01:55:00Z" + }, + "value": { + "$id": "2047", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3229232 + } + } + }, + { + "$id": "2048", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2049", + "timestamp": { + "$id": "2050", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T02:00:00Z" + }, + "value": { + "$id": "2051", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3230463 + } + } + }, + { + "$id": "2052", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2053", + "timestamp": { + "$id": "2054", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T02:05:00Z" + }, + "value": { + "$id": "2055", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3230468 + } + } + }, + { + "$id": "2056", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2057", + "timestamp": { + "$id": "2058", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T02:10:00Z" + }, + "value": { + "$id": "2059", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3230468 + } + } + }, + { + "$id": "2060", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2061", + "timestamp": { + "$id": "2062", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T02:15:00Z" + }, + "value": { + "$id": "2063", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3230468 + } + } + }, + { + "$id": "2064", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2065", + "timestamp": { + "$id": "2066", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T02:20:00Z" + }, + "value": { + "$id": "2067", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3230470 + } + } + }, + { + "$id": "2068", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2069", + "timestamp": { + "$id": "2070", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T02:25:00Z" + }, + "value": { + "$id": "2071", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3230467 + } + } + }, + { + "$id": "2072", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2073", + "timestamp": { + "$id": "2074", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T02:30:00Z" + }, + "value": { + "$id": "2075", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3230506 + } + } + }, + { + "$id": "2076", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2077", + "timestamp": { + "$id": "2078", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T02:35:00Z" + }, + "value": { + "$id": "2079", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3231536 + } + } + }, + { + "$id": "2080", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2081", + "timestamp": { + "$id": "2082", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T02:40:00Z" + }, + "value": { + "$id": "2083", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3230723 + } + } + }, + { + "$id": "2084", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2085", + "timestamp": { + "$id": "2086", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T02:45:00Z" + }, + "value": { + "$id": "2087", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3230727 + } + } + }, + { + "$id": "2088", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2089", + "timestamp": { + "$id": "2090", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T02:50:00Z" + }, + "value": { + "$id": "2091", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3230727 + } + } + }, + { + "$id": "2092", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2093", + "timestamp": { + "$id": "2094", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T02:55:00Z" + }, + "value": { + "$id": "2095", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3230727 + } + } + }, + { + "$id": "2096", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2097", + "timestamp": { + "$id": "2098", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T03:00:00Z" + }, + "value": { + "$id": "2099", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3231880 + } + } + }, + { + "$id": "2100", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2101", + "timestamp": { + "$id": "2102", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T03:05:00Z" + }, + "value": { + "$id": "2103", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3232283 + } + } + }, + { + "$id": "2104", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2105", + "timestamp": { + "$id": "2106", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T03:10:00Z" + }, + "value": { + "$id": "2107", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3232283 + } + } + }, + { + "$id": "2108", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2109", + "timestamp": { + "$id": "2110", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T03:15:00Z" + }, + "value": { + "$id": "2111", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3232283 + } + } + }, + { + "$id": "2112", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2113", + "timestamp": { + "$id": "2114", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T03:20:00Z" + }, + "value": { + "$id": "2115", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3232325 + } + } + }, + { + "$id": "2116", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2117", + "timestamp": { + "$id": "2118", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T03:25:00Z" + }, + "value": { + "$id": "2119", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3232323 + } + } + }, + { + "$id": "2120", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2121", + "timestamp": { + "$id": "2122", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T03:30:00Z" + }, + "value": { + "$id": "2123", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3232327 + } + } + }, + { + "$id": "2124", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2125", + "timestamp": { + "$id": "2126", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T03:35:00Z" + }, + "value": { + "$id": "2127", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3232340 + } + } + }, + { + "$id": "2128", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2129", + "timestamp": { + "$id": "2130", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T03:40:00Z" + }, + "value": { + "$id": "2131", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3232713 + } + } + }, + { + "$id": "2132", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2133", + "timestamp": { + "$id": "2134", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T03:45:00Z" + }, + "value": { + "$id": "2135", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3232729 + } + } + }, + { + "$id": "2136", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2137", + "timestamp": { + "$id": "2138", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T03:50:00Z" + }, + "value": { + "$id": "2139", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3232756 + } + } + }, + { + "$id": "2140", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2141", + "timestamp": { + "$id": "2142", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T03:55:00Z" + }, + "value": { + "$id": "2143", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3233500 + } + } + }, + { + "$id": "2144", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2145", + "timestamp": { + "$id": "2146", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T04:00:00Z" + }, + "value": { + "$id": "2147", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3233500 + } + } + }, + { + "$id": "2148", + "kind": "model", + "type": { + "$ref": "219" + }, + "value": { + "$id": "2149", + "timestamp": { + "$id": "2150", + "kind": "string", + "type": { + "$ref": "221" + }, + "value": "2017-01-02T04:05:00Z" + }, + "value": { + "$id": "2151", + "kind": "number", + "type": { + "$ref": "224" + }, + "value": 3233500 + } + } + } + ] + }, + "granularity": { + "$id": "2152", + "kind": "string", + "type": { + "$ref": "29" + }, + "value": "minutely" + }, + "customInterval": { + "$id": "2153", + "kind": "number", + "type": { + "$ref": "289" + }, + "value": 5 + }, + "stableTrendWindow": { + "$id": "2154", + "kind": "number", + "type": { + "$ref": "293" + }, + "value": 10 + }, + "threshold": { + "$id": "2155", + "kind": "number", + "type": { + "$ref": "295" + }, + "value": 0.99 + }, + "period": { + "$id": "2156", + "kind": "number", + "type": { + "$ref": "291" + }, + "value": 0 + } + } + } + } + ] + } + ] } ], "Protocol": { - "$id": "345" + "$id": "2157" }, "Parent": "AnomalyDetectorClient", "Parameters": [ @@ -3005,11 +15139,11 @@ "Decorators": [] }, { - "$id": "346", + "$id": "2158", "Name": "Multivariate", "Operations": [ { - "$id": "347", + "$id": "2159", "Name": "GetMultivariateBatchDetectionResult", "ResourceName": "Multivariate", "Summary": "Get Multivariate Anomaly Detection Result", @@ -3017,12 +15151,12 @@ "Accessibility": "public", "Parameters": [ { - "$id": "348", + "$id": "2160", "Name": "Endpoint", "NameInRequest": "Endpoint", "Description": "Supported Cognitive Services endpoints (protocol and hostname, for example:\nhttps://westus2.api.cognitive.microsoft.com).", "Type": { - "$id": "349", + "$id": "2161", "Kind": "url", "Name": "url", "CrossLanguageDefinitionId": "TypeSpec.url" @@ -3038,7 +15172,7 @@ "Kind": "Client" }, { - "$id": "350", + "$id": "2162", "Name": "ApiVersion", "NameInRequest": "ApiVersion", "Description": "Api Version", @@ -3055,9 +15189,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "351", + "$id": "2163", "Type": { - "$id": "352", + "$id": "2164", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -3066,17 +15200,17 @@ } }, { - "$id": "353", + "$id": "2165", "Name": "resultId", "NameInRequest": "resultId", "Description": "ID of a batch detection result.", "Type": { - "$id": "354", + "$id": "2166", "Kind": "string", "Name": "uuid", "CrossLanguageDefinitionId": "Azure.Core.uuid", "BaseType": { - "$id": "355", + "$id": "2167", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3094,14 +15228,14 @@ "Decorators": [] }, { - "$id": "356", + "$id": "2168", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "357", + "$id": "2169", "Kind": "constant", "ValueType": { - "$id": "358", + "$id": "2170", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3122,7 +15256,7 @@ ], "Responses": [ { - "$id": "359", + "$id": "2171", "StatusCodes": [ 200 ], @@ -3145,10 +15279,169 @@ "GenerateProtocolMethod": true, "GenerateConvenienceMethod": true, "CrossLanguageDefinitionId": "AnomalyDetector.Multivariate.GetMultivariateBatchDetectionResult", - "Decorators": [] + "Decorators": [], + "Examples": [ + { + "$id": "2172", + "kind": "http", + "name": "Get multivariate batch detection result", + "description": "Get multivariate batch detection result", + "filePath": "v1.1/GetResult.json", + "rawExample": { + "$id": "2173", + "operationId": "Multivariate_GetMultivariateBatchDetectionResult", + "title": "Get multivariate batch detection result", + "parameters": { + "$id": "2174", + "Endpoint": "{Endpoint}", + "ApiVersion": "v1.1", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "resultId": "663884e6-b117-11ea-b3de-0242ac130004", + "body": { + "$id": "2175" + } + }, + "responses": { + "200": { + "$id": "2177", + "body": { + "$id": "2178", + "resultId": "663884e6-b117-11ea-b3de-0242ac130004", + "summary": { + "$id": "2179", + "status": "READY", + "errors": [], + "variableStates": [ + { + "$id": "2180", + "variable": "variable_1", + "filledNARatio": 0, + "effectiveCount": 30, + "firstTimestamp": "2021-01-01T00:00:00Z", + "lastTimestamp": "2021-01-01T00:29:00Z" + }, + { + "$id": "2181", + "variable": "variable_2", + "filledNARatio": 0, + "effectiveCount": 30, + "firstTimestamp": "2021-01-01T00:00:00Z", + "lastTimestamp": "2021-01-01T00:29:00Z" + }, + { + "$id": "2182", + "variable": "variable_3", + "filledNARatio": 0, + "effectiveCount": 30, + "firstTimestamp": "2021-01-01T00:00:00Z", + "lastTimestamp": "2021-01-01T00:29:00Z" + } + ], + "setupInfo": { + "$id": "2183", + "dataSource": "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", + "topContributorCount": 10, + "startTime": "2021-01-01T00:00:00Z", + "endTime": "2021-01-01T00:29:00Z" + } + }, + "results": [ + { + "$id": "2184", + "timestamp": "2021-01-01T00:28:00Z", + "value": { + "$id": "2185", + "isAnomaly": false, + "severity": 0, + "score": 0.6928471326828003 + }, + "errors": [] + }, + { + "$id": "2186", + "timestamp": "2021-01-01T00:29:00Z", + "value": { + "$id": "2187", + "isAnomaly": true, + "severity": 0.5337404608726501, + "score": 0.9171165823936462, + "interpretation": [ + { + "$id": "2188", + "variable": "variable_2", + "contributionScore": 0.5371576215, + "correlationChanges": { + "$id": "2189", + "changedVariables": [ + "variable_1", + "variable_3" + ] + } + }, + { + "$id": "2190", + "variable": "variable_3", + "contributionScore": 0.3324159383, + "correlationChanges": { + "$id": "2191", + "changedVariables": [ + "variable_2" + ] + } + }, + { + "$id": "2192", + "variable": "variable_1", + "contributionScore": 0.1304264402, + "correlationChanges": { + "$id": "2193", + "changedVariables": [] + } + } + ] + } + } + ] + } + }, + "$id": "2176", + "default": { + "$id": "2194", + "headers": { + "$id": "2195", + "Content-Type": "application/json", + "x-ms-error-code": "Error Code" + }, + "body": { + "$id": "2196", + "code": "Error Code", + "message": "Error Message" + } + } + } + }, + "parameters": [ + { + "$id": "2197", + "parameter": { + "$ref": "2165" + }, + "value": { + "$id": "2198", + "kind": "string", + "type": { + "$ref": "2166" + }, + "value": "663884e6-b117-11ea-b3de-0242ac130004" + } + } + ] + } + ] }, { - "$id": "360", + "$id": "2199", "Name": "TrainMultivariateModel", "ResourceName": "Multivariate", "Summary": "Train a Multivariate Anomaly Detection Model", @@ -3156,21 +15449,21 @@ "Accessibility": "public", "Parameters": [ { - "$ref": "348" + "$ref": "2160" }, { - "$ref": "350" + "$ref": "2162" }, { - "$id": "361", + "$id": "2200", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "362", + "$id": "2201", "Kind": "constant", "ValueType": { - "$id": "363", + "$id": "2202", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3189,14 +15482,14 @@ "Decorators": [] }, { - "$id": "364", + "$id": "2203", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "365", + "$id": "2204", "Kind": "constant", "ValueType": { - "$id": "366", + "$id": "2205", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3215,7 +15508,7 @@ "Decorators": [] }, { - "$id": "367", + "$id": "2206", "Name": "modelInfo", "NameInRequest": "modelInfo", "Description": "Model information.", @@ -3234,7 +15527,7 @@ ], "Responses": [ { - "$id": "368", + "$id": "2207", "StatusCodes": [ 201 ], @@ -3244,12 +15537,12 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "369", + "$id": "2208", "Name": "Location", "NameInResponse": "location", "Description": "Location and ID of the model.", "Type": { - "$id": "370", + "$id": "2209", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3274,10 +15567,192 @@ "GenerateProtocolMethod": true, "GenerateConvenienceMethod": true, "CrossLanguageDefinitionId": "AnomalyDetector.Multivariate.TrainMultivariateModel", - "Decorators": [] + "Decorators": [], + "Examples": [ + { + "$id": "2210", + "kind": "http", + "name": "Create and train multivariate model", + "description": "Create and train multivariate model", + "filePath": "v1.1/TrainModel.json", + "rawExample": { + "$id": "2211", + "operationId": "Multivariate_TrainMultivariateModel", + "title": "Create and train multivariate model", + "parameters": { + "$id": "2212", + "Endpoint": "{Endpoint}", + "ApiVersion": "v1.1", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "modelInfo": { + "$id": "2213", + "slidingWindow": 20, + "alignPolicy": { + "$id": "2214", + "alignMode": "Outer", + "fillNAMethod": "Linear", + "paddingValue": 0 + }, + "dataSource": "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", + "dataSchema": "OneTable", + "startTime": "2019-04-01T00:00:00Z", + "endTime": "2019-04-02T00:00:00Z", + "displayName": "Devops-MultiAD" + } + }, + "responses": { + "201": { + "$id": "2216", + "headers": { + "$id": "2217", + "Location": "{Endpoint}/anomalydetector/v1.1/multivariate/models/{modelId}" + }, + "body": { + "$id": "2218", + "modelId": "45aad126-aafd-11ea-b8fb-d89ef3400c5f", + "createdTime": "2020-06-30T00:00:00Z", + "lastUpdatedTime": "2020-06-30T00:00:00Z", + "modelInfo": { + "$id": "2219", + "slidingWindow": 20, + "alignPolicy": { + "$id": "2220", + "alignMode": "Outer", + "fillNAMethod": "Linear", + "paddingValue": 0 + }, + "dataSource": "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", + "dataSchema": "OneTable", + "startTime": "2019-04-01T00:00:00Z", + "endTime": "2019-04-02T00:00:00Z", + "displayName": "Devops-MultiAD", + "status": "CREATED", + "errors": [] + } + } + }, + "$id": "2215", + "default": { + "$id": "2221", + "headers": { + "$id": "2222", + "Content-Type": "application/json", + "x-ms-error-code": "Error Code" + }, + "body": { + "$id": "2223", + "code": "Error Code", + "message": "Error Message" + } + } + } + }, + "parameters": [ + { + "$id": "2224", + "parameter": { + "$ref": "2206" + }, + "value": { + "$id": "2225", + "kind": "model", + "type": { + "$ref": "136" + }, + "value": { + "$id": "2226", + "slidingWindow": { + "$id": "2227", + "kind": "number", + "type": { + "$ref": "149" + }, + "value": 20 + }, + "alignPolicy": { + "$id": "2228", + "kind": "model", + "type": { + "$ref": "151" + }, + "value": { + "$id": "2229", + "alignMode": { + "$id": "2230", + "kind": "string", + "type": { + "$ref": "12" + }, + "value": "Outer" + }, + "fillNAMethod": { + "$id": "2231", + "kind": "string", + "type": { + "$ref": "16" + }, + "value": "Linear" + }, + "paddingValue": { + "$id": "2232", + "kind": "number", + "type": { + "$ref": "155" + }, + "value": 0 + } + } + }, + "dataSource": { + "$id": "2233", + "kind": "string", + "type": { + "$ref": "138" + }, + "value": "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv" + }, + "dataSchema": { + "$id": "2234", + "kind": "string", + "type": { + "$ref": "8" + }, + "value": "OneTable" + }, + "startTime": { + "$id": "2235", + "kind": "string", + "type": { + "$ref": "141" + }, + "value": "2019-04-01T00:00:00Z" + }, + "endTime": { + "$id": "2236", + "kind": "string", + "type": { + "$ref": "144" + }, + "value": "2019-04-02T00:00:00Z" + }, + "displayName": { + "$id": "2237", + "kind": "string", + "type": { + "$ref": "147" + }, + "value": "Devops-MultiAD" + } + } + } + } + ] + } + ] }, { - "$id": "371", + "$id": "2238", "Name": "ListMultivariateModels", "ResourceName": "Multivariate", "Summary": "List Multivariate Models", @@ -3285,18 +15760,18 @@ "Accessibility": "public", "Parameters": [ { - "$ref": "348" + "$ref": "2160" }, { - "$ref": "350" + "$ref": "2162" }, { - "$id": "372", + "$id": "2239", "Name": "skip", "NameInRequest": "skip", "Description": "Skip indicates how many models will be skipped.", "Type": { - "$id": "373", + "$id": "2240", "Kind": "int32", "Name": "int32", "CrossLanguageDefinitionId": "TypeSpec.int32", @@ -3312,12 +15787,12 @@ "Decorators": [] }, { - "$id": "374", + "$id": "2241", "Name": "top", "NameInRequest": "top", "Description": "Top indicates how many models will be fetched.", "Type": { - "$id": "375", + "$id": "2242", "Kind": "int32", "Name": "int32", "CrossLanguageDefinitionId": "TypeSpec.int32", @@ -3333,14 +15808,14 @@ "Decorators": [] }, { - "$id": "376", + "$id": "2243", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "377", + "$id": "2244", "Kind": "constant", "ValueType": { - "$id": "378", + "$id": "2245", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3361,7 +15836,7 @@ ], "Responses": [ { - "$id": "379", + "$id": "2246", "StatusCodes": [ 200 ], @@ -3382,17 +15857,251 @@ "Path": "/multivariate/models", "BufferResponse": true, "Paging": { - "$id": "380", + "$id": "2247", "ItemName": "models", "NextLinkName": "nextLink" }, "GenerateProtocolMethod": true, "GenerateConvenienceMethod": true, "CrossLanguageDefinitionId": "AnomalyDetector.Multivariate.ListMultivariateModels", - "Decorators": [] + "Decorators": [], + "Examples": [ + { + "$id": "2248", + "kind": "http", + "name": "List multivariate models", + "description": "List multivariate models", + "filePath": "v1.1/ListModel.json", + "rawExample": { + "$id": "2249", + "operationId": "Multivariate_ListMultivariateModels", + "title": "List multivariate models", + "parameters": { + "$id": "2250", + "Endpoint": "{Endpoint}", + "ApiVersion": "v1.1", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "skip": 0, + "top": 10, + "body": { + "$id": "2251" + } + }, + "responses": { + "200": { + "$id": "2253", + "body": { + "$id": "2254", + "models": [ + { + "$id": "2255", + "modelId": "45aad126-aafd-11ea-b8fb-d89ef3400c5f", + "createdTime": "2020-06-30T00:00:00Z", + "lastUpdatedTime": "2020-06-30T00:00:00Z", + "modelInfo": { + "$id": "2256", + "slidingWindow": 20, + "alignPolicy": { + "$id": "2257", + "alignMode": "Outer", + "fillNAMethod": "Linear", + "paddingValue": 0 + }, + "dataSource": "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", + "dataSchema": "OneTable", + "startTime": "2019-04-01T00:00:00Z", + "endTime": "2019-04-02T00:00:00Z", + "displayName": "Devops-MultiAD", + "status": "READY", + "errors": [], + "diagnosticsInfo": { + "$id": "2258", + "modelState": { + "$id": "2259", + "epochIds": [ + 10, + 20, + 30, + 40, + 50, + 60, + 70, + 80, + 90, + 100 + ], + "trainLosses": [ + 0.6291328072547913, + 0.1671326905488968, + 0.12354248017072678, + 0.10259664058685303, + 0.09584927558898926, + 0.09069952368736267, + 0.08686016499996185, + 0.08603022992610931, + 0.08287354558706284, + 0.08235538005828857 + ], + "validationLosses": [ + 1.9232804775238037, + 1.0645641088485718, + 0.6031560301780701, + 0.5302737951278687, + 0.46980252861976624, + 0.4395163357257843, + 0.41829314827919006, + 0.40579143166542053, + 0.405649870634079, + 0.38492488861083984 + ], + "latenciesInSeconds": [ + 0.3398594856262207, + 0.3659665584564209, + 0.37360644340515137, + 0.35134077072143555, + 0.33703041076660156, + 0.31876277923583984, + 0.32833099365234375, + 0.3503587245941162, + 0.3080024719238281, + 0.3327946662902832 + ] + }, + "variableStates": [ + { + "$id": "2260", + "variable": "ad_input", + "filledNARatio": 0, + "effectiveCount": 1441, + "firstTimestamp": "2019-04-01T00:00:00Z", + "lastTimestamp": "2019-04-02T00:00:00Z" + }, + { + "$id": "2261", + "variable": "ad_ontimer_output", + "filledNARatio": 0, + "effectiveCount": 1441, + "firstTimestamp": "2019-04-01T00:00:00Z", + "lastTimestamp": "2019-04-02T00:00:00Z" + }, + { + "$id": "2262", + "variable": "ingestion", + "filledNARatio": 0, + "effectiveCount": 1441, + "firstTimestamp": "2019-04-01T00:00:00Z", + "lastTimestamp": "2019-04-02T00:00:00Z" + }, + { + "$id": "2263", + "variable": "data_in_speed", + "filledNARatio": 0, + "effectiveCount": 1441, + "firstTimestamp": "2019-04-01T00:00:00Z", + "lastTimestamp": "2019-04-02T00:00:00Z" + }, + { + "$id": "2264", + "variable": "cpu", + "filledNARatio": 0, + "effectiveCount": 1441, + "firstTimestamp": "2019-04-01T00:00:00Z", + "lastTimestamp": "2019-04-02T00:00:00Z" + }, + { + "$id": "2265", + "variable": "ad_series_init", + "filledNARatio": 0, + "effectiveCount": 1441, + "firstTimestamp": "2019-04-01T00:00:00Z", + "lastTimestamp": "2019-04-02T00:00:00Z" + }, + { + "$id": "2266", + "variable": "flink_last_ckpt_duration", + "filledNARatio": 0, + "effectiveCount": 1441, + "firstTimestamp": "2019-04-01T00:00:00Z", + "lastTimestamp": "2019-04-02T00:00:00Z" + }, + { + "$id": "2267", + "variable": "data_out_speed", + "filledNARatio": 0, + "effectiveCount": 1441, + "firstTimestamp": "2019-04-01T00:00:00Z", + "lastTimestamp": "2019-04-02T00:00:00Z" + }, + { + "$id": "2268", + "variable": "ad_output", + "filledNARatio": 0, + "effectiveCount": 1441, + "firstTimestamp": "2019-04-01T00:00:00Z", + "lastTimestamp": "2019-04-02T00:00:00Z" + } + ] + } + } + } + ], + "currentCount": 1, + "maxCount": 20, + "nextLink": "" + } + }, + "$id": "2252", + "default": { + "$id": "2269", + "headers": { + "$id": "2270", + "Content-Type": "application/json", + "x-ms-error-code": "Error Code" + }, + "body": { + "$id": "2271", + "code": "Error Code", + "message": "Error Message" + } + } + } + }, + "parameters": [ + { + "$id": "2272", + "parameter": { + "$ref": "2239" + }, + "value": { + "$id": "2273", + "kind": "number", + "type": { + "$ref": "2240" + }, + "value": 0 + } + }, + { + "$id": "2274", + "parameter": { + "$ref": "2241" + }, + "value": { + "$id": "2275", + "kind": "number", + "type": { + "$ref": "2242" + }, + "value": 10 + } + } + ] + } + ] }, { - "$id": "381", + "$id": "2276", "Name": "DeleteMultivariateModel", "ResourceName": "Multivariate", "Summary": "Delete Multivariate Model", @@ -3400,18 +16109,18 @@ "Accessibility": "public", "Parameters": [ { - "$ref": "348" + "$ref": "2160" }, { - "$ref": "350" + "$ref": "2162" }, { - "$id": "382", + "$id": "2277", "Name": "modelId", "NameInRequest": "modelId", "Description": "Model identifier.", "Type": { - "$id": "383", + "$id": "2278", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3427,14 +16136,14 @@ "Decorators": [] }, { - "$id": "384", + "$id": "2279", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "385", + "$id": "2280", "Kind": "constant", "ValueType": { - "$id": "386", + "$id": "2281", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3455,7 +16164,7 @@ ], "Responses": [ { - "$id": "387", + "$id": "2282", "StatusCodes": [ 204 ], @@ -3472,10 +16181,70 @@ "GenerateProtocolMethod": true, "GenerateConvenienceMethod": true, "CrossLanguageDefinitionId": "AnomalyDetector.Multivariate.DeleteMultivariateModel", - "Decorators": [] + "Decorators": [], + "Examples": [ + { + "$id": "2283", + "kind": "http", + "name": "Delete multivariate model", + "description": "Delete multivariate model", + "filePath": "v1.1/DeleteModel.json", + "rawExample": { + "$id": "2284", + "operationId": "Multivariate_DeleteMultivariateModel", + "title": "Delete multivariate model", + "parameters": { + "$id": "2285", + "Endpoint": "{Endpoint}", + "ApiVersion": "v1.1", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "modelId": "45aad126-aafd-11ea-b8fb-d89ef3400c5f", + "body": { + "$id": "2286" + } + }, + "responses": { + "204": { + "$id": "2288" + }, + "$id": "2287", + "default": { + "$id": "2289", + "headers": { + "$id": "2290", + "Content-Type": "application/json", + "x-ms-error-code": "Error Code" + }, + "body": { + "$id": "2291", + "code": "Error Code", + "message": "Error Message" + } + } + } + }, + "parameters": [ + { + "$id": "2292", + "parameter": { + "$ref": "2277" + }, + "value": { + "$id": "2293", + "kind": "string", + "type": { + "$ref": "2278" + }, + "value": "45aad126-aafd-11ea-b8fb-d89ef3400c5f" + } + } + ] + } + ] }, { - "$id": "388", + "$id": "2294", "Name": "GetMultivariateModel", "ResourceName": "Multivariate", "Summary": "Get Multivariate Model", @@ -3483,18 +16252,18 @@ "Accessibility": "public", "Parameters": [ { - "$ref": "348" + "$ref": "2160" }, { - "$ref": "350" + "$ref": "2162" }, { - "$id": "389", + "$id": "2295", "Name": "modelId", "NameInRequest": "modelId", "Description": "Model identifier.", "Type": { - "$id": "390", + "$id": "2296", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3510,14 +16279,14 @@ "Decorators": [] }, { - "$id": "391", + "$id": "2297", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "392", + "$id": "2298", "Kind": "constant", "ValueType": { - "$id": "393", + "$id": "2299", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3538,7 +16307,7 @@ ], "Responses": [ { - "$id": "394", + "$id": "2300", "StatusCodes": [ 200 ], @@ -3561,10 +16330,221 @@ "GenerateProtocolMethod": true, "GenerateConvenienceMethod": true, "CrossLanguageDefinitionId": "AnomalyDetector.Multivariate.GetMultivariateModel", - "Decorators": [] + "Decorators": [], + "Examples": [ + { + "$id": "2301", + "kind": "http", + "name": "Get a multivariate model", + "description": "Get a multivariate model", + "filePath": "v1.1/GetModel.json", + "rawExample": { + "$id": "2302", + "operationId": "Multivariate_GetMultivariateModel", + "title": "Get a multivariate model", + "parameters": { + "$id": "2303", + "Endpoint": "{Endpoint}", + "ApiVersion": "v1.1", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "modelId": "45aad126-aafd-11ea-b8fb-d89ef3400c5f", + "body": { + "$id": "2304" + } + }, + "responses": { + "200": { + "$id": "2306", + "body": { + "$id": "2307", + "modelId": "45aad126-aafd-11ea-b8fb-d89ef3400c5f", + "createdTime": "2020-06-30T00:00:00Z", + "lastUpdatedTime": "2020-06-30T00:00:00Z", + "modelInfo": { + "$id": "2308", + "slidingWindow": 20, + "alignPolicy": { + "$id": "2309", + "alignMode": "Outer", + "fillNAMethod": "Linear", + "paddingValue": 0 + }, + "dataSource": "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", + "dataSchema": "OneTable", + "startTime": "2019-04-01T00:00:00Z", + "endTime": "2019-04-02T00:00:00Z", + "displayName": "Devops-MultiAD", + "status": "READY", + "errors": [], + "diagnosticsInfo": { + "$id": "2310", + "modelState": { + "$id": "2311", + "epochIds": [ + 10, + 20, + 30, + 40, + 50, + 60, + 70, + 80, + 90, + 100 + ], + "trainLosses": [ + 0.6291328072547913, + 0.1671326905488968, + 0.12354248017072678, + 0.10259664058685303, + 0.09584927558898926, + 0.09069952368736267, + 0.08686016499996185, + 0.08603022992610931, + 0.08287354558706284, + 0.08235538005828857 + ], + "validationLosses": [ + 1.9232804775238037, + 1.0645641088485718, + 0.6031560301780701, + 0.5302737951278687, + 0.46980252861976624, + 0.4395163357257843, + 0.41829314827919006, + 0.40579143166542053, + 0.405649870634079, + 0.38492488861083984 + ], + "latenciesInSeconds": [ + 0.3398594856262207, + 0.3659665584564209, + 0.37360644340515137, + 0.35134077072143555, + 0.33703041076660156, + 0.31876277923583984, + 0.32833099365234375, + 0.3503587245941162, + 0.3080024719238281, + 0.3327946662902832 + ] + }, + "variableStates": [ + { + "$id": "2312", + "variable": "ad_input", + "filledNARatio": 0, + "effectiveCount": 1441, + "firstTimestamp": "2019-04-01T00:00:00Z", + "lastTimestamp": "2019-04-02T00:00:00Z" + }, + { + "$id": "2313", + "variable": "ad_ontimer_output", + "filledNARatio": 0, + "effectiveCount": 1441, + "firstTimestamp": "2019-04-01T00:00:00Z", + "lastTimestamp": "2019-04-02T00:00:00Z" + }, + { + "$id": "2314", + "variable": "ingestion", + "filledNARatio": 0, + "effectiveCount": 1441, + "firstTimestamp": "2019-04-01T00:00:00Z", + "lastTimestamp": "2019-04-02T00:00:00Z" + }, + { + "$id": "2315", + "variable": "data_in_speed", + "filledNARatio": 0, + "effectiveCount": 1441, + "firstTimestamp": "2019-04-01T00:00:00Z", + "lastTimestamp": "2019-04-02T00:00:00Z" + }, + { + "$id": "2316", + "variable": "cpu", + "filledNARatio": 0, + "effectiveCount": 1441, + "firstTimestamp": "2019-04-01T00:00:00Z", + "lastTimestamp": "2019-04-02T00:00:00Z" + }, + { + "$id": "2317", + "variable": "ad_series_init", + "filledNARatio": 0, + "effectiveCount": 1441, + "firstTimestamp": "2019-04-01T00:00:00Z", + "lastTimestamp": "2019-04-02T00:00:00Z" + }, + { + "$id": "2318", + "variable": "flink_last_ckpt_duration", + "filledNARatio": 0, + "effectiveCount": 1441, + "firstTimestamp": "2019-04-01T00:00:00Z", + "lastTimestamp": "2019-04-02T00:00:00Z" + }, + { + "$id": "2319", + "variable": "data_out_speed", + "filledNARatio": 0, + "effectiveCount": 1441, + "firstTimestamp": "2019-04-01T00:00:00Z", + "lastTimestamp": "2019-04-02T00:00:00Z" + }, + { + "$id": "2320", + "variable": "ad_output", + "filledNARatio": 0, + "effectiveCount": 1441, + "firstTimestamp": "2019-04-01T00:00:00Z", + "lastTimestamp": "2019-04-02T00:00:00Z" + } + ] + } + } + } + }, + "$id": "2305", + "default": { + "$id": "2321", + "headers": { + "$id": "2322", + "Content-Type": "application/json", + "x-ms-error-code": "Error Code" + }, + "body": { + "$id": "2323", + "code": "Error Code", + "message": "Error Message" + } + } + } + }, + "parameters": [ + { + "$id": "2324", + "parameter": { + "$ref": "2295" + }, + "value": { + "$id": "2325", + "kind": "string", + "type": { + "$ref": "2296" + }, + "value": "45aad126-aafd-11ea-b8fb-d89ef3400c5f" + } + } + ] + } + ] }, { - "$id": "395", + "$id": "2326", "Name": "DetectMultivariateBatchAnomaly", "ResourceName": "Multivariate", "Summary": "Detect Multivariate Anomaly", @@ -3572,18 +16552,18 @@ "Accessibility": "public", "Parameters": [ { - "$ref": "348" + "$ref": "2160" }, { - "$ref": "350" + "$ref": "2162" }, { - "$id": "396", + "$id": "2327", "Name": "modelId", "NameInRequest": "modelId", "Description": "Model identifier.", "Type": { - "$id": "397", + "$id": "2328", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3599,15 +16579,15 @@ "Decorators": [] }, { - "$id": "398", + "$id": "2329", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "399", + "$id": "2330", "Kind": "constant", "ValueType": { - "$id": "400", + "$id": "2331", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3626,14 +16606,14 @@ "Decorators": [] }, { - "$id": "401", + "$id": "2332", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "402", + "$id": "2333", "Kind": "constant", "ValueType": { - "$id": "403", + "$id": "2334", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3652,7 +16632,7 @@ "Decorators": [] }, { - "$id": "404", + "$id": "2335", "Name": "options", "NameInRequest": "options", "Description": "Request of multivariate anomaly detection.", @@ -3671,7 +16651,7 @@ ], "Responses": [ { - "$id": "405", + "$id": "2336", "StatusCodes": [ 202 ], @@ -3681,12 +16661,12 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "406", + "$id": "2337", "Name": "Operation-Id", "NameInResponse": "operation-id", "Description": "Id of the detection result.", "Type": { - "$id": "407", + "$id": "2338", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3694,12 +16674,12 @@ } }, { - "$id": "408", + "$id": "2339", "Name": "Operation-Location", "NameInResponse": "operation-location", "Description": "Location of the detection result.", "Type": { - "$id": "409", + "$id": "2340", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3724,10 +16704,144 @@ "GenerateProtocolMethod": true, "GenerateConvenienceMethod": true, "CrossLanguageDefinitionId": "AnomalyDetector.Multivariate.DetectMultivariateBatchAnomaly", - "Decorators": [] + "Decorators": [], + "Examples": [ + { + "$id": "2341", + "kind": "http", + "name": "Detect multivariate batch anomaly", + "description": "Detect multivariate batch anomaly", + "filePath": "v1.1/DetectAnomaly.json", + "rawExample": { + "$id": "2342", + "operationId": "Multivariate_DetectMultivariateBatchAnomaly", + "title": "Detect multivariate batch anomaly", + "parameters": { + "$id": "2343", + "Endpoint": "{Endpoint}", + "ApiVersion": "v1.1", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "modelId": "45aad126-aafd-11ea-b8fb-d89ef3400c5f", + "options": { + "$id": "2344", + "dataSource": "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", + "topContributorCount": 10, + "startTime": "2019-04-01T00:15:00Z", + "endTime": "2019-04-01T00:40:00Z" + } + }, + "responses": { + "202": { + "$id": "2346", + "headers": { + "$id": "2347", + "Operation-Location": "{Endpoint}/anomalydetector/v1.1/multivariate/detect-batch/", + "Operation-Id": "663884e6-b117-11ea-b3de-0242ac130004" + }, + "body": { + "$id": "2348", + "resultId": "663884e6-b117-11ea-b3de-0242ac130004", + "summary": { + "$id": "2349", + "status": "CREATED", + "errors": [], + "setupInfo": { + "$id": "2350", + "dataSource": "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", + "topContributorCount": 10, + "startTime": "2021-01-01T00:00:00Z", + "endTime": "2021-01-01T00:29:00Z" + } + }, + "results": [] + } + }, + "$id": "2345", + "default": { + "$id": "2351", + "headers": { + "$id": "2352", + "Content-Type": "application/json", + "x-ms-error-code": "Error Code" + }, + "body": { + "$id": "2353", + "code": "Error Code", + "message": "Error Message" + } + } + } + }, + "parameters": [ + { + "$id": "2354", + "parameter": { + "$ref": "2327" + }, + "value": { + "$id": "2355", + "kind": "string", + "type": { + "$ref": "2328" + }, + "value": "45aad126-aafd-11ea-b8fb-d89ef3400c5f" + } + }, + { + "$id": "2356", + "parameter": { + "$ref": "2335" + }, + "value": { + "$id": "2357", + "kind": "model", + "type": { + "$ref": "97" + }, + "value": { + "$id": "2358", + "dataSource": { + "$id": "2359", + "kind": "string", + "type": { + "$ref": "99" + }, + "value": "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv" + }, + "topContributorCount": { + "$id": "2360", + "kind": "number", + "type": { + "$ref": "101" + }, + "value": 10 + }, + "startTime": { + "$id": "2361", + "kind": "string", + "type": { + "$ref": "103" + }, + "value": "2019-04-01T00:15:00Z" + }, + "endTime": { + "$id": "2362", + "kind": "string", + "type": { + "$ref": "106" + }, + "value": "2019-04-01T00:40:00Z" + } + } + } + } + ] + } + ] }, { - "$id": "410", + "$id": "2363", "Name": "DetectMultivariateLastAnomaly", "ResourceName": "Multivariate", "Summary": "Detect anomalies in the last point of the request body", @@ -3735,18 +16849,18 @@ "Accessibility": "public", "Parameters": [ { - "$ref": "348" + "$ref": "2160" }, { - "$ref": "350" + "$ref": "2162" }, { - "$id": "411", + "$id": "2364", "Name": "modelId", "NameInRequest": "modelId", "Description": "Model identifier.", "Type": { - "$id": "412", + "$id": "2365", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3762,15 +16876,15 @@ "Decorators": [] }, { - "$id": "413", + "$id": "2366", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "414", + "$id": "2367", "Kind": "constant", "ValueType": { - "$id": "415", + "$id": "2368", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3789,14 +16903,14 @@ "Decorators": [] }, { - "$id": "416", + "$id": "2369", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "417", + "$id": "2370", "Kind": "constant", "ValueType": { - "$id": "418", + "$id": "2371", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3815,7 +16929,7 @@ "Decorators": [] }, { - "$id": "419", + "$id": "2372", "Name": "options", "NameInRequest": "options", "Description": "Request of last detection.", @@ -3834,7 +16948,7 @@ ], "Responses": [ { - "$id": "420", + "$id": "2373", "StatusCodes": [ 200 ], @@ -3860,28 +16974,1963 @@ "GenerateProtocolMethod": true, "GenerateConvenienceMethod": true, "CrossLanguageDefinitionId": "AnomalyDetector.Multivariate.DetectMultivariateLastAnomaly", - "Decorators": [] + "Decorators": [], + "Examples": [ + { + "$id": "2374", + "kind": "http", + "name": "Detect multivariate last anomaly", + "description": "Detect multivariate last anomaly", + "filePath": "v1.1/LastDetectAnomaly.json", + "rawExample": { + "$id": "2375", + "operationId": "Multivariate_DetectMultivariateLastAnomaly", + "title": "Detect multivariate last anomaly", + "parameters": { + "$id": "2376", + "Endpoint": "{Endpoint}", + "ApiVersion": "v1.1", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "modelId": "45aad126-aafd-11ea-b8fb-d89ef3400c5f", + "options": { + "$id": "2377", + "variables": [ + { + "$id": "2378", + "variable": "Variable_1", + "timestamps": [ + "2021-01-01T00:00:00Z", + "2021-01-01T00:01:00Z", + "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", + "2021-01-01T00:04:00Z", + "2021-01-01T00:05:00Z", + "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", + "2021-01-01T00:08:00Z", + "2021-01-01T00:09:00Z", + "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", + "2021-01-01T00:12:00Z", + "2021-01-01T00:13:00Z", + "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", + "2021-01-01T00:16:00Z", + "2021-01-01T00:17:00Z", + "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", + "2021-01-01T00:20:00Z", + "2021-01-01T00:21:00Z", + "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", + "2021-01-01T00:24:00Z", + "2021-01-01T00:25:00Z", + "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", + "2021-01-01T00:28:00Z", + "2021-01-01T00:29:00Z" + ], + "values": [ + 0.4551378545933972, + 0.7388603950488748, + 0.201088255984052, + 0.7462812245891899, + 0.07308128850401663, + 0.33090474587393537, + 0.7544925268153315, + 0.987506336316328, + 0.6665932993421468, + 0.6308351543168672, + 0.08083310161466228, + 0.8414415588668442, + 0.514583545640453, + 0.0954489875193526, + 0.7786793231920507, + 0.41646133667960994, + 0.030176187583339287, + 0.3474214937189324, + 0.508530173413991, + 0.42451199127255046, + 0.2115944222725208, + 0.24733519545833516, + 0.8791022110982156, + 0.9479621899884665, + 0.26702703121252136, + 0.6954503497669413, + 0.1235728391488995, + 0.8214915473050647, + 0.11813002444192677, + 0.8579045951076123 + ] + }, + { + "$id": "2379", + "variable": "Variable_2", + "timestamps": [ + "2021-01-01T00:00:00Z", + "2021-01-01T00:01:00Z", + "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", + "2021-01-01T00:04:00Z", + "2021-01-01T00:05:00Z", + "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", + "2021-01-01T00:08:00Z", + "2021-01-01T00:09:00Z", + "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", + "2021-01-01T00:12:00Z", + "2021-01-01T00:13:00Z", + "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", + "2021-01-01T00:16:00Z", + "2021-01-01T00:17:00Z", + "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", + "2021-01-01T00:20:00Z", + "2021-01-01T00:21:00Z", + "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", + "2021-01-01T00:24:00Z", + "2021-01-01T00:25:00Z", + "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", + "2021-01-01T00:28:00Z", + "2021-01-01T00:29:00Z" + ], + "values": [ + 0.9617871613964145, + 0.24903311574778408, + 0.4920561254118613, + 0.9895601049618598, + 0.9171759283128094, + 0.5754204711105273, + 0.1811033296265634, + 0.8852311981742577, + 0.9543231904644779, + 0.7088012446094262, + 0.7843572237149014, + 0.7664787010700046, + 0.3699552325387093, + 0.504519908266789, + 0.5848930929950164, + 0.7628913396089576, + 0.8148405868900065, + 0.08540458873739332, + 0.03481976727525682, + 0.21275099339467762, + 0.9836175579199806, + 0.9321441483364282, + 0.038466608085469534, + 0.1723138437622782, + 0.8626383410218382, + 0.35053229974224254, + 0.631141662835182, + 0.0730352607990088, + 0.08886179043386, + 0.7488606040971179 + ] + }, + { + "$id": "2380", + "variable": "Variable_3", + "timestamps": [ + "2021-01-01T00:00:00Z", + "2021-01-01T00:01:00Z", + "2021-01-01T00:02:00Z", + "2021-01-01T00:03:00Z", + "2021-01-01T00:04:00Z", + "2021-01-01T00:05:00Z", + "2021-01-01T00:06:00Z", + "2021-01-01T00:07:00Z", + "2021-01-01T00:08:00Z", + "2021-01-01T00:09:00Z", + "2021-01-01T00:10:00Z", + "2021-01-01T00:11:00Z", + "2021-01-01T00:12:00Z", + "2021-01-01T00:13:00Z", + "2021-01-01T00:14:00Z", + "2021-01-01T00:15:00Z", + "2021-01-01T00:16:00Z", + "2021-01-01T00:17:00Z", + "2021-01-01T00:18:00Z", + "2021-01-01T00:19:00Z", + "2021-01-01T00:20:00Z", + "2021-01-01T00:21:00Z", + "2021-01-01T00:22:00Z", + "2021-01-01T00:23:00Z", + "2021-01-01T00:24:00Z", + "2021-01-01T00:25:00Z", + "2021-01-01T00:26:00Z", + "2021-01-01T00:27:00Z", + "2021-01-01T00:28:00Z", + "2021-01-01T00:29:00Z" + ], + "values": [ + 0.4030756879437628, + 0.15526889968448554, + 0.36352226408981103, + 0.6051200637229004, + 0.8516795018476276, + 0.2645605735279929, + 0.6810875830037345, + 0.9165894221681316, + 0.700783245230424, + 0.5624155469940331, + 0.6277289685127893, + 0.15992056539730204, + 0.6020964482827594, + 0.35937967753105915, + 0.8731686034848609, + 0.20301549117588935, + 0.029261872151168933, + 0.6261499548828445, + 0.45850782028563386, + 0.8275006940083313, + 0.032760268834037376, + 0.4485202784055029, + 0.8915691008748384, + 0.891669051517807, + 0.9469979353323046, + 0.115293087370132, + 0.08818772518459506, + 0.7426286620589166, + 0.32372247468990756, + 0.936268139507417 + ] + } + ], + "topContributorCount": 10 + } + }, + "responses": { + "200": { + "$id": "2382", + "body": { + "$id": "2383", + "variableStates": [ + { + "$id": "2384", + "variable": "variable_1", + "filledNARatio": 0, + "effectiveCount": 30, + "firstTimestamp": "2021-01-01T00:00:00Z", + "lastTimestamp": "2021-01-01T00:29:00Z" + }, + { + "$id": "2385", + "variable": "variable_2", + "filledNARatio": 0, + "effectiveCount": 30, + "firstTimestamp": "2021-01-01T00:00:00Z", + "lastTimestamp": "2021-01-01T00:29:00Z" + }, + { + "$id": "2386", + "variable": "variable_3", + "filledNARatio": 0, + "effectiveCount": 30, + "firstTimestamp": "2021-01-01T00:00:00Z", + "lastTimestamp": "2021-01-01T00:29:00Z" + } + ], + "results": [ + { + "$id": "2387", + "timestamp": "2021-01-01T00:28:00Z", + "value": { + "$id": "2388", + "isAnomaly": false, + "severity": 0, + "score": 0.6928471326828003 + }, + "errors": [] + }, + { + "$id": "2389", + "timestamp": "2021-01-01T00:29:00Z", + "value": { + "$id": "2390", + "isAnomaly": true, + "severity": 0.5337404608726501, + "score": 0.9171165823936462, + "interpretation": [ + { + "$id": "2391", + "variable": "variable_2", + "contributionScore": 0.5371576215, + "correlationChanges": { + "$id": "2392", + "changedVariables": [ + "variable_1", + "variable_3" + ] + } + }, + { + "$id": "2393", + "variable": "variable_3", + "contributionScore": 0.3324159383, + "correlationChanges": { + "$id": "2394", + "changedVariables": [ + "variable_2" + ] + } + }, + { + "$id": "2395", + "variable": "variable_1", + "contributionScore": 0.1304264402, + "correlationChanges": { + "$id": "2396", + "changedVariables": [] + } + } + ] + }, + "errors": [] + } + ] + } + }, + "$id": "2381", + "default": { + "$id": "2397", + "headers": { + "$id": "2398", + "Content-Type": "application/json", + "x-ms-error-code": "Error Code" + }, + "body": { + "$id": "2399", + "code": "Error Code", + "message": "Error Message" + } + } + } + }, + "parameters": [ + { + "$id": "2400", + "parameter": { + "$ref": "2364" + }, + "value": { + "$id": "2401", + "kind": "string", + "type": { + "$ref": "2365" + }, + "value": "45aad126-aafd-11ea-b8fb-d89ef3400c5f" + } + }, + { + "$id": "2402", + "parameter": { + "$ref": "2372" + }, + "value": { + "$id": "2403", + "kind": "model", + "type": { + "$ref": "197" + }, + "value": { + "$id": "2404", + "variables": { + "$id": "2405", + "kind": "array", + "type": { + "$ref": "199" + }, + "value": [ + { + "$id": "2406", + "kind": "model", + "type": { + "$ref": "200" + }, + "value": { + "$id": "2407", + "variable": { + "$id": "2408", + "kind": "string", + "type": { + "$ref": "202" + }, + "value": "Variable_1" + }, + "timestamps": { + "$id": "2409", + "kind": "array", + "type": { + "$ref": "204" + }, + "value": [ + { + "$id": "2410", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:00:00Z" + }, + { + "$id": "2411", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:01:00Z" + }, + { + "$id": "2412", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:02:00Z" + }, + { + "$id": "2413", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:03:00Z" + }, + { + "$id": "2414", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:04:00Z" + }, + { + "$id": "2415", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:05:00Z" + }, + { + "$id": "2416", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:06:00Z" + }, + { + "$id": "2417", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:07:00Z" + }, + { + "$id": "2418", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:08:00Z" + }, + { + "$id": "2419", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:09:00Z" + }, + { + "$id": "2420", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:10:00Z" + }, + { + "$id": "2421", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:11:00Z" + }, + { + "$id": "2422", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:12:00Z" + }, + { + "$id": "2423", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:13:00Z" + }, + { + "$id": "2424", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:14:00Z" + }, + { + "$id": "2425", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:15:00Z" + }, + { + "$id": "2426", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:16:00Z" + }, + { + "$id": "2427", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:17:00Z" + }, + { + "$id": "2428", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:18:00Z" + }, + { + "$id": "2429", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:19:00Z" + }, + { + "$id": "2430", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:20:00Z" + }, + { + "$id": "2431", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:21:00Z" + }, + { + "$id": "2432", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:22:00Z" + }, + { + "$id": "2433", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:23:00Z" + }, + { + "$id": "2434", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:24:00Z" + }, + { + "$id": "2435", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:25:00Z" + }, + { + "$id": "2436", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:26:00Z" + }, + { + "$id": "2437", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:27:00Z" + }, + { + "$id": "2438", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:28:00Z" + }, + { + "$id": "2439", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:29:00Z" + } + ] + }, + "values": { + "$id": "2440", + "kind": "array", + "type": { + "$ref": "207" + }, + "value": [ + { + "$id": "2441", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.4551378545933972 + }, + { + "$id": "2442", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.7388603950488748 + }, + { + "$id": "2443", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.201088255984052 + }, + { + "$id": "2444", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.7462812245891899 + }, + { + "$id": "2445", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.07308128850401663 + }, + { + "$id": "2446", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.33090474587393537 + }, + { + "$id": "2447", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.7544925268153315 + }, + { + "$id": "2448", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.987506336316328 + }, + { + "$id": "2449", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.6665932993421468 + }, + { + "$id": "2450", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.6308351543168672 + }, + { + "$id": "2451", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.08083310161466228 + }, + { + "$id": "2452", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.8414415588668442 + }, + { + "$id": "2453", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.514583545640453 + }, + { + "$id": "2454", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.0954489875193526 + }, + { + "$id": "2455", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.7786793231920507 + }, + { + "$id": "2456", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.41646133667960994 + }, + { + "$id": "2457", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.030176187583339287 + }, + { + "$id": "2458", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.3474214937189324 + }, + { + "$id": "2459", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.508530173413991 + }, + { + "$id": "2460", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.42451199127255046 + }, + { + "$id": "2461", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.2115944222725208 + }, + { + "$id": "2462", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.24733519545833516 + }, + { + "$id": "2463", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.8791022110982156 + }, + { + "$id": "2464", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.9479621899884665 + }, + { + "$id": "2465", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.26702703121252136 + }, + { + "$id": "2466", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.6954503497669413 + }, + { + "$id": "2467", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.1235728391488995 + }, + { + "$id": "2468", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.8214915473050647 + }, + { + "$id": "2469", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.11813002444192677 + }, + { + "$id": "2470", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.8579045951076123 + } + ] + } + } + }, + { + "$id": "2471", + "kind": "model", + "type": { + "$ref": "200" + }, + "value": { + "$id": "2472", + "variable": { + "$id": "2473", + "kind": "string", + "type": { + "$ref": "202" + }, + "value": "Variable_2" + }, + "timestamps": { + "$id": "2474", + "kind": "array", + "type": { + "$ref": "204" + }, + "value": [ + { + "$id": "2475", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:00:00Z" + }, + { + "$id": "2476", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:01:00Z" + }, + { + "$id": "2477", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:02:00Z" + }, + { + "$id": "2478", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:03:00Z" + }, + { + "$id": "2479", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:04:00Z" + }, + { + "$id": "2480", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:05:00Z" + }, + { + "$id": "2481", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:06:00Z" + }, + { + "$id": "2482", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:07:00Z" + }, + { + "$id": "2483", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:08:00Z" + }, + { + "$id": "2484", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:09:00Z" + }, + { + "$id": "2485", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:10:00Z" + }, + { + "$id": "2486", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:11:00Z" + }, + { + "$id": "2487", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:12:00Z" + }, + { + "$id": "2488", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:13:00Z" + }, + { + "$id": "2489", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:14:00Z" + }, + { + "$id": "2490", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:15:00Z" + }, + { + "$id": "2491", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:16:00Z" + }, + { + "$id": "2492", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:17:00Z" + }, + { + "$id": "2493", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:18:00Z" + }, + { + "$id": "2494", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:19:00Z" + }, + { + "$id": "2495", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:20:00Z" + }, + { + "$id": "2496", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:21:00Z" + }, + { + "$id": "2497", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:22:00Z" + }, + { + "$id": "2498", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:23:00Z" + }, + { + "$id": "2499", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:24:00Z" + }, + { + "$id": "2500", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:25:00Z" + }, + { + "$id": "2501", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:26:00Z" + }, + { + "$id": "2502", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:27:00Z" + }, + { + "$id": "2503", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:28:00Z" + }, + { + "$id": "2504", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:29:00Z" + } + ] + }, + "values": { + "$id": "2505", + "kind": "array", + "type": { + "$ref": "207" + }, + "value": [ + { + "$id": "2506", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.9617871613964145 + }, + { + "$id": "2507", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.24903311574778408 + }, + { + "$id": "2508", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.4920561254118613 + }, + { + "$id": "2509", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.9895601049618598 + }, + { + "$id": "2510", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.9171759283128094 + }, + { + "$id": "2511", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.5754204711105273 + }, + { + "$id": "2512", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.1811033296265634 + }, + { + "$id": "2513", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.8852311981742577 + }, + { + "$id": "2514", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.9543231904644779 + }, + { + "$id": "2515", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.7088012446094262 + }, + { + "$id": "2516", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.7843572237149014 + }, + { + "$id": "2517", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.7664787010700046 + }, + { + "$id": "2518", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.3699552325387093 + }, + { + "$id": "2519", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.504519908266789 + }, + { + "$id": "2520", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.5848930929950164 + }, + { + "$id": "2521", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.7628913396089576 + }, + { + "$id": "2522", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.8148405868900065 + }, + { + "$id": "2523", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.08540458873739332 + }, + { + "$id": "2524", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.03481976727525682 + }, + { + "$id": "2525", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.21275099339467762 + }, + { + "$id": "2526", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.9836175579199806 + }, + { + "$id": "2527", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.9321441483364282 + }, + { + "$id": "2528", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.038466608085469534 + }, + { + "$id": "2529", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.1723138437622782 + }, + { + "$id": "2530", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.8626383410218382 + }, + { + "$id": "2531", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.35053229974224254 + }, + { + "$id": "2532", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.631141662835182 + }, + { + "$id": "2533", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.0730352607990088 + }, + { + "$id": "2534", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.08886179043386 + }, + { + "$id": "2535", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.7488606040971179 + } + ] + } + } + }, + { + "$id": "2536", + "kind": "model", + "type": { + "$ref": "200" + }, + "value": { + "$id": "2537", + "variable": { + "$id": "2538", + "kind": "string", + "type": { + "$ref": "202" + }, + "value": "Variable_3" + }, + "timestamps": { + "$id": "2539", + "kind": "array", + "type": { + "$ref": "204" + }, + "value": [ + { + "$id": "2540", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:00:00Z" + }, + { + "$id": "2541", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:01:00Z" + }, + { + "$id": "2542", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:02:00Z" + }, + { + "$id": "2543", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:03:00Z" + }, + { + "$id": "2544", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:04:00Z" + }, + { + "$id": "2545", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:05:00Z" + }, + { + "$id": "2546", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:06:00Z" + }, + { + "$id": "2547", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:07:00Z" + }, + { + "$id": "2548", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:08:00Z" + }, + { + "$id": "2549", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:09:00Z" + }, + { + "$id": "2550", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:10:00Z" + }, + { + "$id": "2551", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:11:00Z" + }, + { + "$id": "2552", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:12:00Z" + }, + { + "$id": "2553", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:13:00Z" + }, + { + "$id": "2554", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:14:00Z" + }, + { + "$id": "2555", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:15:00Z" + }, + { + "$id": "2556", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:16:00Z" + }, + { + "$id": "2557", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:17:00Z" + }, + { + "$id": "2558", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:18:00Z" + }, + { + "$id": "2559", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:19:00Z" + }, + { + "$id": "2560", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:20:00Z" + }, + { + "$id": "2561", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:21:00Z" + }, + { + "$id": "2562", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:22:00Z" + }, + { + "$id": "2563", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:23:00Z" + }, + { + "$id": "2564", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:24:00Z" + }, + { + "$id": "2565", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:25:00Z" + }, + { + "$id": "2566", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:26:00Z" + }, + { + "$id": "2567", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:27:00Z" + }, + { + "$id": "2568", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:28:00Z" + }, + { + "$id": "2569", + "kind": "string", + "type": { + "$ref": "205" + }, + "value": "2021-01-01T00:29:00Z" + } + ] + }, + "values": { + "$id": "2570", + "kind": "array", + "type": { + "$ref": "207" + }, + "value": [ + { + "$id": "2571", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.4030756879437628 + }, + { + "$id": "2572", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.15526889968448554 + }, + { + "$id": "2573", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.36352226408981103 + }, + { + "$id": "2574", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.6051200637229004 + }, + { + "$id": "2575", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.8516795018476276 + }, + { + "$id": "2576", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.2645605735279929 + }, + { + "$id": "2577", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.6810875830037345 + }, + { + "$id": "2578", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.9165894221681316 + }, + { + "$id": "2579", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.700783245230424 + }, + { + "$id": "2580", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.5624155469940331 + }, + { + "$id": "2581", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.6277289685127893 + }, + { + "$id": "2582", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.15992056539730204 + }, + { + "$id": "2583", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.6020964482827594 + }, + { + "$id": "2584", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.35937967753105915 + }, + { + "$id": "2585", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.8731686034848609 + }, + { + "$id": "2586", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.20301549117588935 + }, + { + "$id": "2587", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.029261872151168933 + }, + { + "$id": "2588", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.6261499548828445 + }, + { + "$id": "2589", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.45850782028563386 + }, + { + "$id": "2590", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.8275006940083313 + }, + { + "$id": "2591", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.032760268834037376 + }, + { + "$id": "2592", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.4485202784055029 + }, + { + "$id": "2593", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.8915691008748384 + }, + { + "$id": "2594", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.891669051517807 + }, + { + "$id": "2595", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.9469979353323046 + }, + { + "$id": "2596", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.115293087370132 + }, + { + "$id": "2597", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.08818772518459506 + }, + { + "$id": "2598", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.7426286620589166 + }, + { + "$id": "2599", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.32372247468990756 + }, + { + "$id": "2600", + "kind": "number", + "type": { + "$ref": "208" + }, + "value": 0.936268139507417 + } + ] + } + } + } + ] + }, + "topContributorCount": { + "$id": "2601", + "kind": "number", + "type": { + "$ref": "210" + }, + "value": 10 + } + } + } + } + ] + } + ] } ], "Protocol": { - "$id": "421" + "$id": "2602" }, "Parent": "AnomalyDetectorClient", "Parameters": [ { - "$ref": "348" + "$ref": "2160" }, { - "$ref": "350" + "$ref": "2162" } ], "Decorators": [] } ], "Auth": { - "$id": "422", + "$id": "2603", "ApiKey": { - "$id": "423", + "$id": "2604", "Name": "Ocp-Apim-Subscription-Key" } } diff --git a/samples/AnomalyDetector/tspconfig.yaml b/samples/AnomalyDetector/tspconfig.yaml index ebef0c6e79b..b63e20a3bbf 100644 --- a/samples/AnomalyDetector/tspconfig.yaml +++ b/samples/AnomalyDetector/tspconfig.yaml @@ -1,3 +1,4 @@ options: "@azure-tools/typespec-csharp": flavor: "azure" + examples-dir: "{project-root}/examples" From 7221c4f44d52974d2bd1fba6f7cc2824da682b5c Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Wed, 21 Aug 2024 15:31:35 +0800 Subject: [PATCH 24/27] remove the examples in firsttest --- .../FirstTest-TypeSpec/Configuration.json | 3 +- .../FirstTestTypeSpec_TopAction.json | 15 - .../src/Generated/Docs/Entity.xml | 131 + .../src/Generated/Docs/EnumTest.xml | 51 + .../Docs/FirstTestTypeSpecClient.xml | 2210 ++++++++++++++- .../src/Generated/Docs/Glossary.xml | 131 + .../src/Generated/Docs/HelloDemo.xml | 97 + .../src/Generated/Docs/HelloDemo2.xml | 1453 ++++++++++ .../src/Generated/Entity.cs | 4 + .../src/Generated/EnumTest.cs | 2 + .../src/Generated/FirstTestTypeSpecClient.cs | 80 + .../src/Generated/Glossary.cs | 4 + .../src/Generated/HelloDemo.cs | 2 + .../src/Generated/HelloDemo2.cs | 18 + .../tests/Generated/Samples/Samples_Entity.cs | 158 ++ .../Generated/Samples/Samples_EnumTest.cs | 71 + .../Samples_FirstTestTypeSpecClient.cs | 2472 ++++++++++++++++- .../Generated/Samples/Samples_Glossary.cs | 158 ++ .../Generated/Samples/Samples_HelloDemo.cs | 117 + .../Generated/Samples/Samples_HelloDemo2.cs | 1524 ++++++++++ .../tests/Generated/Tests/EntityTests.cs | 67 + .../tests/Generated/Tests/EnumTestTests.cs | 47 + .../Tests/FirstTestTypeSpecClientTests.cs | 1128 +++++++- .../tests/Generated/Tests/GlossaryTests.cs | 67 + .../tests/Generated/Tests/HelloDemo2Tests.cs | 581 ++++ .../tests/Generated/Tests/HelloDemoTests.cs | 44 + .../FirstTest-TypeSpec/tspCodeModel.json | 637 ++--- .../FirstTest-TypeSpec/tspconfig.yaml | 1 - 28 files changed, 10886 insertions(+), 387 deletions(-) delete mode 100644 test/TestProjects/FirstTest-TypeSpec/examples/2022-05-15-preview/FirstTestTypeSpec_TopAction.json create mode 100644 test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/Entity.xml create mode 100644 test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/EnumTest.xml create mode 100644 test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/Glossary.xml create mode 100644 test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/HelloDemo.xml create mode 100644 test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/HelloDemo2.xml create mode 100644 test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_Entity.cs create mode 100644 test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_EnumTest.cs create mode 100644 test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_Glossary.cs create mode 100644 test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_HelloDemo.cs create mode 100644 test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_HelloDemo2.cs create mode 100644 test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/EntityTests.cs create mode 100644 test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/EnumTestTests.cs create mode 100644 test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/GlossaryTests.cs create mode 100644 test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/HelloDemo2Tests.cs create mode 100644 test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/HelloDemoTests.cs diff --git a/test/TestProjects/FirstTest-TypeSpec/Configuration.json b/test/TestProjects/FirstTest-TypeSpec/Configuration.json index aefabf84c0a..2477ab8fcb1 100644 --- a/test/TestProjects/FirstTest-TypeSpec/Configuration.json +++ b/test/TestProjects/FirstTest-TypeSpec/Configuration.json @@ -10,6 +10,5 @@ "shared-source-folders": [ "../../../../../artifacts/bin/AutoRest.CSharp/Debug/net8.0/Generator.Shared", "../../../../../artifacts/bin/AutoRest.CSharp/Debug/net8.0/Azure.Core.Shared" - ], - "examples-dir": "examples" + ] } diff --git a/test/TestProjects/FirstTest-TypeSpec/examples/2022-05-15-preview/FirstTestTypeSpec_TopAction.json b/test/TestProjects/FirstTest-TypeSpec/examples/2022-05-15-preview/FirstTestTypeSpec_TopAction.json deleted file mode 100644 index ba82e2ee4a1..00000000000 --- a/test/TestProjects/FirstTest-TypeSpec/examples/2022-05-15-preview/FirstTestTypeSpec_TopAction.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "operationId": "TopAction", - "title": "For test topAction", - "parameters": { - "action": "2024-05-06T12:20-12Z" - }, - "responses": { - "200": { - "body": { - "name": "test", - "requiredUnion": ["a", "b", "c"] - } - } - } -} diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/Entity.xml b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/Entity.xml new file mode 100644 index 00000000000..04f82125200 --- /dev/null +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/Entity.xml @@ -0,0 +1,131 @@ + + + + + +This sample shows how to call DoSomethingAsync. +"); +Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); + +Response response = await client.DoSomethingAsync(""); +]]> +This sample shows how to call DoSomethingAsync with all parameters. +"); +Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); + +Response response = await client.DoSomethingAsync(""); +]]> + + + +This sample shows how to call DoSomething. +"); +Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); + +Response response = client.DoSomething(""); +]]> +This sample shows how to call DoSomething with all parameters. +"); +Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); + +Response response = client.DoSomething(""); +]]> + + + +This sample shows how to call DoSomethingAsync and parse the result. +"); +Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); + +Response response = await client.DoSomethingAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +]]> +This sample shows how to call DoSomethingAsync with all parameters and parse the result. +"); +Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); + +Response response = await client.DoSomethingAsync("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); +]]> + + + +This sample shows how to call DoSomething and parse the result. +"); +Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); + +Response response = client.DoSomething("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +]]> +This sample shows how to call DoSomething with all parameters and parse the result. +"); +Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); + +Response response = client.DoSomething("", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); +]]> + + + \ No newline at end of file diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/EnumTest.xml b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/EnumTest.xml new file mode 100644 index 00000000000..f88c4631c97 --- /dev/null +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/EnumTest.xml @@ -0,0 +1,51 @@ + + + + + +This sample shows how to call CreateUnknownValueAsync. +"); +EnumTest client = new FirstTestTypeSpecClient(endpoint).GetEnumTestClient(); + +using RequestContent content = RequestContent.Create("Monday"); +Response response = await client.CreateUnknownValueAsync(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreateUnknownValueAsync with all request content. +"); +EnumTest client = new FirstTestTypeSpecClient(endpoint).GetEnumTestClient(); + +using RequestContent content = RequestContent.Create("Monday"); +Response response = await client.CreateUnknownValueAsync(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call CreateUnknownValue. +"); +EnumTest client = new FirstTestTypeSpecClient(endpoint).GetEnumTestClient(); + +using RequestContent content = RequestContent.Create("Monday"); +Response response = client.CreateUnknownValue(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call CreateUnknownValue with all request content. +"); +EnumTest client = new FirstTestTypeSpecClient(endpoint).GetEnumTestClient(); + +using RequestContent content = RequestContent.Create("Monday"); +Response response = client.CreateUnknownValue(content); + +Console.WriteLine(response.Status); +]]> + + + \ No newline at end of file diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/FirstTestTypeSpecClient.xml b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/FirstTestTypeSpecClient.xml index 82f94349842..e02ec274304 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/FirstTestTypeSpecClient.xml +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/FirstTestTypeSpecClient.xml @@ -5,30 +5,62 @@ This sample shows how to call TopActionAsync. "); +Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); -Response response = await client.TopActionAsync(DateTimeOffset.Parse("2024-05-06T12:20-12Z")); +Response response = await client.TopActionAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); +]]> +This sample shows how to call TopActionAsync with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.TopActionAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); ]]> This sample shows how to call TopAction. "); +Uri endpoint = new Uri(""); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.TopAction(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); +]]> +This sample shows how to call TopAction with all parameters. +"); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); -Response response = client.TopAction(DateTimeOffset.Parse("2024-05-06T12:20-12Z")); +Response response = client.TopAction(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); ]]> This sample shows how to call TopActionAsync and parse the result. "); +Uri endpoint = new Uri(""); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.TopActionAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +]]> +This sample shows how to call TopActionAsync with all parameters and parse the result. +"); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); -Response response = await client.TopActionAsync(DateTimeOffset.Parse("2024-05-06T12:20-12Z"), null); +Response response = await client.TopActionAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -37,19 +69,471 @@ Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); ]]> This sample shows how to call TopAction and parse the result. "); +Uri endpoint = new Uri(""); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.TopAction(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +]]> +This sample shows how to call TopAction with all parameters and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.TopAction(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); +]]> + + + +This sample shows how to call TopAction2Async and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.TopAction2Async(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +]]> +This sample shows how to call TopAction2Async with all parameters and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.TopAction2Async(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); +]]> + + + +This sample shows how to call TopAction2 and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.TopAction2(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +]]> +This sample shows how to call TopAction2 with all parameters and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.TopAction2(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); +]]> + + + +This sample shows how to call PatchActionAsync and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + requiredBadDescription = "", + requiredNullableList = new object[] + { + 1234 + }, + requiredFloatProperty = new object(), +}); +Response response = await client.PatchActionAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +]]> +This sample shows how to call PatchActionAsync with all request content and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + optionalLiteralString = "reject", + optionalLiteralInt = 456, + optionalLiteralFloat = 4.56F, + optionalLiteralBool = true, + requiredBadDescription = "", + optionalNullableList = new object[] + { + 1234 + }, + requiredNullableList = new object[] + { + 1234 + }, + requiredFloatProperty = new object(), + optionalFloatProperty = new object(), + optionalResourceId = "", +}); +Response response = await client.PatchActionAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); +]]> + + + +This sample shows how to call PatchAction and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + requiredBadDescription = "", + requiredNullableList = new object[] + { + 1234 + }, + requiredFloatProperty = new object(), +}); +Response response = client.PatchAction(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +]]> +This sample shows how to call PatchAction with all request content and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + optionalLiteralString = "reject", + optionalLiteralInt = 456, + optionalLiteralFloat = 4.56F, + optionalLiteralBool = true, + requiredBadDescription = "", + optionalNullableList = new object[] + { + 1234 + }, + requiredNullableList = new object[] + { + 1234 + }, + requiredFloatProperty = new object(), + optionalFloatProperty = new object(), + optionalResourceId = "", +}); +Response response = client.PatchAction(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); +]]> + + + +This sample shows how to call AnonymousBodyAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.AnonymousBodyAsync("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default, AnonymousBodyRequestRequiredLiteralString.Accept, AnonymousBodyRequestRequiredLiteralInt._123, AnonymousBodyRequestRequiredLiteralFloat._123, false); +]]> +This sample shows how to call AnonymousBodyAsync with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.AnonymousBodyAsync("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default, AnonymousBodyRequestRequiredLiteralString.Accept, AnonymousBodyRequestRequiredLiteralInt._123, AnonymousBodyRequestRequiredLiteralFloat._123, false, optionalLiteralString: AnonymousBodyRequestOptionalLiteralString.Reject, optionalLiteralInt: AnonymousBodyRequestOptionalLiteralInt._456, optionalLiteralFloat: AnonymousBodyRequestOptionalLiteralFloat._456, optionalLiteralBool: true, optionalNullableList: new int[] { 1234 }, optionalFloatProperty: (double)default, optionalResourceId: new ResourceIdentifier("")); +]]> + + + +This sample shows how to call AnonymousBody. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.AnonymousBody("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default, AnonymousBodyRequestRequiredLiteralString.Accept, AnonymousBodyRequestRequiredLiteralInt._123, AnonymousBodyRequestRequiredLiteralFloat._123, false); +]]> +This sample shows how to call AnonymousBody with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.AnonymousBody("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default, AnonymousBodyRequestRequiredLiteralString.Accept, AnonymousBodyRequestRequiredLiteralInt._123, AnonymousBodyRequestRequiredLiteralFloat._123, false, optionalLiteralString: AnonymousBodyRequestOptionalLiteralString.Reject, optionalLiteralInt: AnonymousBodyRequestOptionalLiteralInt._456, optionalLiteralFloat: AnonymousBodyRequestOptionalLiteralFloat._456, optionalLiteralBool: true, optionalNullableList: new int[] { 1234 }, optionalFloatProperty: (double)default, optionalResourceId: new ResourceIdentifier("")); +]]> + + + +This sample shows how to call AnonymousBodyAsync and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + requiredBadDescription = "", + requiredNullableList = new object[] + { + 1234 + }, + requiredFloatProperty = new object(), +}); +Response response = await client.AnonymousBodyAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +]]> +This sample shows how to call AnonymousBodyAsync with all request content and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + optionalLiteralString = "reject", + optionalLiteralInt = 456, + optionalLiteralFloat = 4.56F, + optionalLiteralBool = true, + requiredBadDescription = "", + optionalNullableList = new object[] + { + 1234 + }, + requiredNullableList = new object[] + { + 1234 + }, + requiredFloatProperty = new object(), + optionalFloatProperty = new object(), + optionalResourceId = "", +}); +Response response = await client.AnonymousBodyAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); +]]> + + + +This sample shows how to call AnonymousBody and parse the result. +"); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); -Response response = client.TopAction(DateTimeOffset.Parse("2024-05-06T12:20-12Z"), null); +using RequestContent content = RequestContent.Create(new +{ + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + requiredBadDescription = "", + requiredNullableList = new object[] + { + 1234 + }, + requiredFloatProperty = new object(), +}); +Response response = client.AnonymousBody(content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -61,6 +545,1716 @@ Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +]]> +This sample shows how to call AnonymousBody with all request content and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + optionalLiteralString = "reject", + optionalLiteralInt = 456, + optionalLiteralFloat = 4.56F, + optionalLiteralBool = true, + requiredBadDescription = "", + optionalNullableList = new object[] + { + 1234 + }, + requiredNullableList = new object[] + { + 1234 + }, + requiredFloatProperty = new object(), + optionalFloatProperty = new object(), + optionalResourceId = "", +}); +Response response = client.AnonymousBody(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); +]]> + + + +This sample shows how to call FriendlyModelAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.FriendlyModelAsync(""); +]]> +This sample shows how to call FriendlyModelAsync with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.FriendlyModelAsync(""); +]]> + + + +This sample shows how to call FriendlyModel. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.FriendlyModel(""); +]]> +This sample shows how to call FriendlyModel with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.FriendlyModel(""); +]]> + + + +This sample shows how to call FriendlyModelAsync and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + name = "", +}); +Response response = await client.FriendlyModelAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +]]> +This sample shows how to call FriendlyModelAsync with all request content and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + name = "", +}); +Response response = await client.FriendlyModelAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +]]> + + + +This sample shows how to call FriendlyModel and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + name = "", +}); +Response response = client.FriendlyModel(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +]]> +This sample shows how to call FriendlyModel with all request content and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + name = "", +}); +Response response = client.FriendlyModel(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +]]> + + + +This sample shows how to call AddTimeHeaderAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.AddTimeHeaderAsync(); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call AddTimeHeaderAsync with all request content. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.AddTimeHeaderAsync(); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call AddTimeHeader. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.AddTimeHeader(); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call AddTimeHeader with all request content. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.AddTimeHeader(); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call StringFormatAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); +Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); +]]> +This sample shows how to call StringFormatAsync with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); +Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); +]]> + + + +This sample shows how to call StringFormat. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); +Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); +]]> +This sample shows how to call StringFormat with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); +Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); +]]> + + + +This sample shows how to call StringFormatAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + sourceUrl = "http://localhost:3000", + guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +}); +Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call StringFormatAsync with all parameters and request content. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + sourceUrl = "http://localhost:3000", + guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +}); +Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call StringFormat. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + sourceUrl = "http://localhost:3000", + guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +}); +Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call StringFormat with all parameters and request content. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + sourceUrl = "http://localhost:3000", + guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", +}); +Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call ProjectedNameModelAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.ProjectedNameModelAsync(""); +]]> +This sample shows how to call ProjectedNameModelAsync with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.ProjectedNameModelAsync(""); +]]> + + + +This sample shows how to call ProjectedNameModel. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.ProjectedNameModel(""); +]]> +This sample shows how to call ProjectedNameModel with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.ProjectedNameModel(""); +]]> + + + +This sample shows how to call ProjectedNameModelAsync and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + name = "", +}); +Response response = await client.ProjectedNameModelAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +]]> +This sample shows how to call ProjectedNameModelAsync with all request content and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + name = "", +}); +Response response = await client.ProjectedNameModelAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +]]> + + + +This sample shows how to call ProjectedNameModel and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + name = "", +}); +Response response = client.ProjectedNameModel(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +]]> +This sample shows how to call ProjectedNameModel with all request content and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + name = "", +}); +Response response = client.ProjectedNameModel(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +]]> + + + +This sample shows how to call ReturnsAnonymousModelAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.ReturnsAnonymousModelAsync(); +]]> +This sample shows how to call ReturnsAnonymousModelAsync with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.ReturnsAnonymousModelAsync(); +]]> + + + +This sample shows how to call ReturnsAnonymousModel. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.ReturnsAnonymousModel(); +]]> +This sample shows how to call ReturnsAnonymousModel with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.ReturnsAnonymousModel(); +]]> + + + +This sample shows how to call ReturnsAnonymousModelAsync and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.ReturnsAnonymousModelAsync(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call ReturnsAnonymousModelAsync with all parameters and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.ReturnsAnonymousModelAsync(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> + + + +This sample shows how to call ReturnsAnonymousModel and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.ReturnsAnonymousModel(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call ReturnsAnonymousModel with all parameters and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.ReturnsAnonymousModel(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> + + + +This sample shows how to call HeadAsBooleanAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.HeadAsBooleanAsync(""); + +Console.WriteLine(response.GetRawResponse().Status); +]]> +This sample shows how to call HeadAsBooleanAsync with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.HeadAsBooleanAsync(""); + +Console.WriteLine(response.GetRawResponse().Status); +]]> + + + +This sample shows how to call HeadAsBoolean. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.HeadAsBoolean(""); + +Console.WriteLine(response.GetRawResponse().Status); +]]> +This sample shows how to call HeadAsBoolean with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.HeadAsBoolean(""); + +Console.WriteLine(response.GetRawResponse().Status); +]]> + + + +This sample shows how to call StringBodyAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.StringBodyAsync(""); +]]> +This sample shows how to call StringBodyAsync with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.StringBodyAsync(""); +]]> + + + +This sample shows how to call StringBody. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.StringBody(""); +]]> +This sample shows how to call StringBody with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.StringBody(""); +]]> + + + +This sample shows how to call StringBodyAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(""); +Response response = await client.StringBodyAsync(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call StringBodyAsync with all request content. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(""); +Response response = await client.StringBodyAsync(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call StringBody. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(""); +Response response = client.StringBody(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call StringBody with all request content. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(""); +Response response = client.StringBody(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call BoolBodyAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.BoolBodyAsync(true); +]]> +This sample shows how to call BoolBodyAsync with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.BoolBodyAsync(true); +]]> + + + +This sample shows how to call BoolBody. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.BoolBody(true); +]]> +This sample shows how to call BoolBody with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.BoolBody(true); +]]> + + + +This sample shows how to call BoolBodyAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(true); +Response response = await client.BoolBodyAsync(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call BoolBodyAsync with all request content. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(true); +Response response = await client.BoolBodyAsync(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call BoolBody. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(true); +Response response = client.BoolBody(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call BoolBody with all request content. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(true); +Response response = client.BoolBody(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DateTimeBodyAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.DateTimeBodyAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); +]]> +This sample shows how to call DateTimeBodyAsync with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.DateTimeBodyAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); +]]> + + + +This sample shows how to call DateTimeBody. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.DateTimeBody(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); +]]> +This sample shows how to call DateTimeBody with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.DateTimeBody(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); +]]> + + + +This sample shows how to call DateTimeBodyAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create("2022-05-10T18:57:31.2311892Z"); +Response response = await client.DateTimeBodyAsync(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DateTimeBodyAsync with all request content. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create("2022-05-10T18:57:31.2311892Z"); +Response response = await client.DateTimeBodyAsync(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DateTimeBody. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create("2022-05-10T18:57:31.2311892Z"); +Response response = client.DateTimeBody(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DateTimeBody with all request content. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create("2022-05-10T18:57:31.2311892Z"); +Response response = client.DateTimeBody(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call ReturnStringAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.ReturnStringAsync(); +]]> +This sample shows how to call ReturnStringAsync with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.ReturnStringAsync(); +]]> + + + +This sample shows how to call ReturnString. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.ReturnString(); +]]> +This sample shows how to call ReturnString with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.ReturnString(); +]]> + + + +This sample shows how to call ReturnStringAsync and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.ReturnStringAsync(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call ReturnStringAsync with all parameters and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.ReturnStringAsync(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> + + + +This sample shows how to call ReturnString and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.ReturnString(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call ReturnString with all parameters and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.ReturnString(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> + + + +This sample shows how to call ReturnUnknownAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.ReturnUnknownAsync(); +]]> +This sample shows how to call ReturnUnknownAsync with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.ReturnUnknownAsync(); +]]> + + + +This sample shows how to call ReturnUnknown. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.ReturnUnknown(); +]]> +This sample shows how to call ReturnUnknown with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.ReturnUnknown(); +]]> + + + +This sample shows how to call ReturnUnknownAsync and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.ReturnUnknownAsync(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call ReturnUnknownAsync with all parameters and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.ReturnUnknownAsync(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> + + + +This sample shows how to call ReturnUnknown and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.ReturnUnknown(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call ReturnUnknown with all parameters and parse the result. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.ReturnUnknown(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> + + + +This sample shows how to call RecursiveExtensionAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Extension input = new Extension(123); +Response response = await client.RecursiveExtensionAsync(input); +]]> +This sample shows how to call RecursiveExtensionAsync with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Extension input = new Extension(123) +{ + Extension = { default }, +}; +Response response = await client.RecursiveExtensionAsync(input); +]]> + + + +This sample shows how to call RecursiveExtension. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Extension input = new Extension(123); +Response response = client.RecursiveExtension(input); +]]> +This sample shows how to call RecursiveExtension with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Extension input = new Extension(123) +{ + Extension = { default }, +}; +Response response = client.RecursiveExtension(input); +]]> + + + +This sample shows how to call RecursiveExtensionAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + level = 123, +}); +Response response = await client.RecursiveExtensionAsync(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call RecursiveExtensionAsync with all request content. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + level = 123, + extension = new object[] + { + null + }, +}); +Response response = await client.RecursiveExtensionAsync(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call RecursiveExtension. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + level = 123, +}); +Response response = client.RecursiveExtension(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call RecursiveExtension with all request content. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + level = 123, + extension = new object[] + { + null + }, +}); +Response response = client.RecursiveExtension(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call ThreeLevelRecursiveAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Extendible input = new Extendible(); +Response response = await client.ThreeLevelRecursiveAsync(input); +]]> +This sample shows how to call ThreeLevelRecursiveAsync with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Extendible input = new Extendible +{ + Extension = {new ThereLevelExtension(123) + { + Extension = {default}, + }}, +}; +Response response = await client.ThreeLevelRecursiveAsync(input); +]]> + + + +This sample shows how to call ThreeLevelRecursive. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Extendible input = new Extendible(); +Response response = client.ThreeLevelRecursive(input); +]]> +This sample shows how to call ThreeLevelRecursive with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Extendible input = new Extendible +{ + Extension = {new ThereLevelExtension(123) + { + Extension = {default}, + }}, +}; +Response response = client.ThreeLevelRecursive(input); +]]> + + + +This sample shows how to call ThreeLevelRecursiveAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.ThreeLevelRecursiveAsync(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call ThreeLevelRecursiveAsync with all request content. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + extension = new object[] + { + new + { + level = 123, + extension = new object[] + { + null + }, + } + }, +}); +Response response = await client.ThreeLevelRecursiveAsync(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call ThreeLevelRecursive. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.ThreeLevelRecursive(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call ThreeLevelRecursive with all request content. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + extension = new object[] + { + new + { + level = 123, + extension = new object[] + { + null + }, + } + }, +}); +Response response = client.ThreeLevelRecursive(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call RecursiveModelsAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +ChildModel input = new ChildModel(123, new BaseModel[] +{ + new BaseModel(123) +}); +Response response = await client.RecursiveModelsAsync(input); +]]> +This sample shows how to call RecursiveModelsAsync with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +ChildModel input = new ChildModel(123, new BaseModel[] +{ + new BaseModel(123) +}); +Response response = await client.RecursiveModelsAsync(input); +]]> + + + +This sample shows how to call RecursiveModels. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +ChildModel input = new ChildModel(123, new BaseModel[] +{ + new BaseModel(123) +}); +Response response = client.RecursiveModels(input); +]]> +This sample shows how to call RecursiveModels with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +ChildModel input = new ChildModel(123, new BaseModel[] +{ + new BaseModel(123) +}); +Response response = client.RecursiveModels(input); +]]> + + + +This sample shows how to call RecursiveModelsAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + parent = new object[] + { + new + { + level = 123, + } + }, + level = 123, +}); +Response response = await client.RecursiveModelsAsync(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call RecursiveModelsAsync with all request content. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + parent = new object[] + { + new + { + level = 123, + } + }, + level = 123, +}); +Response response = await client.RecursiveModelsAsync(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call RecursiveModels. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + parent = new object[] + { + new + { + level = 123, + } + }, + level = 123, +}); +Response response = client.RecursiveModels(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call RecursiveModels with all request content. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + parent = new object[] + { + new + { + level = 123, + } + }, + level = 123, +}); +Response response = client.RecursiveModels(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call ContainSelfModelsAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +ContainSelf input = new ContainSelf(default); +Response response = await client.ContainSelfModelsAsync(input); +]]> +This sample shows how to call ContainSelfModelsAsync with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +ContainSelf input = new ContainSelf(default); +Response response = await client.ContainSelfModelsAsync(input); +]]> + + + +This sample shows how to call ContainSelfModels. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +ContainSelf input = new ContainSelf(default); +Response response = client.ContainSelfModels(input); +]]> +This sample shows how to call ContainSelfModels with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +ContainSelf input = new ContainSelf(default); +Response response = client.ContainSelfModels(input); +]]> + + + +This sample shows how to call ContainSelfModelsAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new { }); +Response response = await client.ContainSelfModelsAsync(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call ContainSelfModelsAsync with all request content. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new { }); +Response response = await client.ContainSelfModelsAsync(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call ContainSelfModels. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new { }); +Response response = client.ContainSelfModels(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call ContainSelfModels with all request content. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new { }); +Response response = client.ContainSelfModels(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call EnumParameterAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.EnumParameterAsync(CsProjectedEnum.CsOne); +]]> +This sample shows how to call EnumParameterAsync with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.EnumParameterAsync(CsProjectedEnum.CsOne); +]]> + + + +This sample shows how to call EnumParameter. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.EnumParameter(CsProjectedEnum.CsOne); +]]> +This sample shows how to call EnumParameter with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.EnumParameter(CsProjectedEnum.CsOne); +]]> + + + +This sample shows how to call EnumParameterAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.EnumParameterAsync(1.1F); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call EnumParameterAsync with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.EnumParameterAsync(1.1F); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call EnumParameter. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.EnumParameter(1.1F); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call EnumParameter with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.EnumParameter(1.1F); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call BodyIsModelWithProjectedEnumAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +ModelWithProjectedEnum body = new ModelWithProjectedEnum(CsProjectedEnumInModel.CsOne); +Response response = await client.BodyIsModelWithProjectedEnumAsync(body); +]]> +This sample shows how to call BodyIsModelWithProjectedEnumAsync with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +ModelWithProjectedEnum body = new ModelWithProjectedEnum(CsProjectedEnumInModel.CsOne); +Response response = await client.BodyIsModelWithProjectedEnumAsync(body); +]]> + + + +This sample shows how to call BodyIsModelWithProjectedEnum. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +ModelWithProjectedEnum body = new ModelWithProjectedEnum(CsProjectedEnumInModel.CsOne); +Response response = client.BodyIsModelWithProjectedEnum(body); +]]> +This sample shows how to call BodyIsModelWithProjectedEnum with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +ModelWithProjectedEnum body = new ModelWithProjectedEnum(CsProjectedEnumInModel.CsOne); +Response response = client.BodyIsModelWithProjectedEnum(body); +]]> + + + +This sample shows how to call BodyIsModelWithProjectedEnumAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + enumProperty = 1.1F, +}); +Response response = await client.BodyIsModelWithProjectedEnumAsync(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call BodyIsModelWithProjectedEnumAsync with all request content. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + enumProperty = 1.1F, +}); +Response response = await client.BodyIsModelWithProjectedEnumAsync(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call BodyIsModelWithProjectedEnum. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + enumProperty = 1.1F, +}); +Response response = client.BodyIsModelWithProjectedEnum(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call BodyIsModelWithProjectedEnum with all request content. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + enumProperty = 1.1F, +}); +Response response = client.BodyIsModelWithProjectedEnum(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call OptionalDictionaryAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.OptionalDictionaryAsync(); +]]> +This sample shows how to call OptionalDictionaryAsync with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.OptionalDictionaryAsync(body: new Dictionary +{ + ["key"] = 1234 +}); +]]> + + + +This sample shows how to call OptionalDictionary. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.OptionalDictionary(); +]]> +This sample shows how to call OptionalDictionary with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.OptionalDictionary(body: new Dictionary +{ + ["key"] = 1234 +}); +]]> + + + +This sample shows how to call OptionalDictionaryAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = null; +Response response = await client.OptionalDictionaryAsync(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call OptionalDictionaryAsync with all request content. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + key = 1234, +}); +Response response = await client.OptionalDictionaryAsync(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call OptionalDictionary. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = null; +Response response = client.OptionalDictionary(content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call OptionalDictionary with all request content. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + key = 1234, +}); +Response response = client.OptionalDictionary(content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call AzureLocationOpAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = await client.AzureLocationOpAsync(new AzureLocation(""), new AzureLocation("")); +]]> +This sample shows how to call AzureLocationOpAsync with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +AzureLocationModel body = new AzureLocationModel(new AzureLocation("")); +Response response = await client.AzureLocationOpAsync(new AzureLocation(""), new AzureLocation(""), body: body); +]]> + + + +This sample shows how to call AzureLocationOp. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +Response response = client.AzureLocationOp(new AzureLocation(""), new AzureLocation("")); +]]> +This sample shows how to call AzureLocationOp with all parameters. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +AzureLocationModel body = new AzureLocationModel(new AzureLocation("")); +Response response = client.AzureLocationOp(new AzureLocation(""), new AzureLocation(""), body: body); +]]> + + + +This sample shows how to call AzureLocationOpAsync. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = null; +Response response = await client.AzureLocationOpAsync(new AzureLocation(""), new AzureLocation(""), content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call AzureLocationOpAsync with all parameters and request content. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + location = "", +}); +Response response = await client.AzureLocationOpAsync(new AzureLocation(""), new AzureLocation(""), content); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call AzureLocationOp. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = null; +Response response = client.AzureLocationOp(new AzureLocation(""), new AzureLocation(""), content); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call AzureLocationOp with all parameters and request content. +"); +FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + +using RequestContent content = RequestContent.Create(new +{ + location = "", +}); +Response response = client.AzureLocationOp(new AzureLocation(""), new AzureLocation(""), content); + +Console.WriteLine(response.Status); ]]> diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/Glossary.xml b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/Glossary.xml new file mode 100644 index 00000000000..e14131e6a11 --- /dev/null +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/Glossary.xml @@ -0,0 +1,131 @@ + + + + + +This sample shows how to call DoSomethingAsync. +"); +Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); + +Response response = await client.DoSomethingAsync("", "

"); +]]> +This sample shows how to call DoSomethingAsync with all parameters. +"); +Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); + +Response response = await client.DoSomethingAsync("", "

"); +]]> + + + +This sample shows how to call DoSomething. +"); +Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); + +Response response = client.DoSomething("", "

"); +]]> +This sample shows how to call DoSomething with all parameters. +"); +Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); + +Response response = client.DoSomething("", "

"); +]]> + + + +This sample shows how to call DoSomethingAsync and parse the result. +"); +Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); + +Response response = await client.DoSomethingAsync("", "

", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +]]> +This sample shows how to call DoSomethingAsync with all parameters and parse the result. +"); +Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); + +Response response = await client.DoSomethingAsync("", "

", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); +]]> + + + +This sample shows how to call DoSomething and parse the result. +"); +Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); + +Response response = client.DoSomething("", "

", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +]]> +This sample shows how to call DoSomething with all parameters and parse the result. +"); +Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); + +Response response = client.DoSomething("", "

", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); +]]> + + + \ No newline at end of file diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/HelloDemo.xml b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/HelloDemo.xml new file mode 100644 index 00000000000..a097d680e17 --- /dev/null +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/HelloDemo.xml @@ -0,0 +1,97 @@ + + + + + +This sample shows how to call SayHiAsync and parse the result. +"); +HelloDemo client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemoClient(); + +Response response = await client.SayHiAsync("", "", null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +]]> +This sample shows how to call SayHiAsync with all parameters and parse the result. +"); +HelloDemo client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemoClient(); + +Response response = await client.SayHiAsync("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); +]]> + + + +This sample shows how to call SayHi and parse the result. +"); +HelloDemo client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemoClient(); + +Response response = client.SayHi("", "", null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +]]> +This sample shows how to call SayHi with all parameters and parse the result. +"); +HelloDemo client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemoClient(); + +Response response = client.SayHi("", "", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); +]]> + + + \ No newline at end of file diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/HelloDemo2.xml b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/HelloDemo2.xml new file mode 100644 index 00000000000..d397ba46ece --- /dev/null +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Docs/HelloDemo2.xml @@ -0,0 +1,1453 @@ + + + + + +This sample shows how to call HelloAgainAsync. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +RoundTripModel action = new RoundTripModel( +"", +1234, +new StringFixedEnum[] { StringFixedEnum.One }, +new Dictionary +{ + ["key"] = StringExtensibleEnum.One +}, +new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default), +BinaryData.FromObjectAsJson(new object()), +new Dictionary +{ + ["key"] = BinaryData.FromObjectAsJson(new object()) +}, +new ModelWithRequiredNullableProperties(1234, StringExtensibleEnum.One, StringFixedEnum.One), +new BinaryData[] +{ + BinaryData.FromObjectAsJson("") +}); +Response response = await client.HelloAgainAsync("", "", action); +]]> +This sample shows how to call HelloAgainAsync with all parameters. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +RoundTripModel action = new RoundTripModel( +"", +1234, +new StringFixedEnum[] { StringFixedEnum.One }, +new Dictionary +{ + ["key"] = StringExtensibleEnum.One +}, +new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default) +{ + OptionalLiteralString = ThingOptionalLiteralString.Reject, + OptionalLiteralInt = ThingOptionalLiteralInt._456, + OptionalLiteralFloat = ThingOptionalLiteralFloat._456, + OptionalLiteralBool = true, + OptionalNullableList = { 1234 }, + OptionalFloatProperty = (double)default, + OptionalResourceId = new ResourceIdentifier(""), +}, +BinaryData.FromObjectAsJson(new object()), +new Dictionary +{ + ["key"] = BinaryData.FromObjectAsJson(new object()) +}, +new ModelWithRequiredNullableProperties(1234, StringExtensibleEnum.One, StringFixedEnum.One), +new BinaryData[] +{ + BinaryData.FromObjectAsJson("") +}) +{ + IntExtensibleEnum = IntExtensibleEnum.One, + IntExtensibleEnumCollection = { IntExtensibleEnum.One }, + FloatExtensibleEnum = FloatExtensibleEnum.One, + FloatExtensibleEnumCollection = { FloatExtensibleEnum.One }, + FloatFixedEnum = FloatFixedEnum.One, + FloatFixedEnumCollection = { FloatFixedEnum.One }, + IntFixedEnum = IntFixedEnum.One, + IntFixedEnumCollection = { IntFixedEnum.One }, + StringFixedEnum = StringFixedEnum.One, + OptionalUnknown = BinaryData.FromObjectAsJson(new object()), + OptionalRecordUnknown = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, +}; +Response response = await client.HelloAgainAsync("", "", action); +]]> + + + +This sample shows how to call HelloAgain. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +RoundTripModel action = new RoundTripModel( +"", +1234, +new StringFixedEnum[] { StringFixedEnum.One }, +new Dictionary +{ + ["key"] = StringExtensibleEnum.One +}, +new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default), +BinaryData.FromObjectAsJson(new object()), +new Dictionary +{ + ["key"] = BinaryData.FromObjectAsJson(new object()) +}, +new ModelWithRequiredNullableProperties(1234, StringExtensibleEnum.One, StringFixedEnum.One), +new BinaryData[] +{ + BinaryData.FromObjectAsJson("") +}); +Response response = client.HelloAgain("", "", action); +]]> +This sample shows how to call HelloAgain with all parameters. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +RoundTripModel action = new RoundTripModel( +"", +1234, +new StringFixedEnum[] { StringFixedEnum.One }, +new Dictionary +{ + ["key"] = StringExtensibleEnum.One +}, +new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default) +{ + OptionalLiteralString = ThingOptionalLiteralString.Reject, + OptionalLiteralInt = ThingOptionalLiteralInt._456, + OptionalLiteralFloat = ThingOptionalLiteralFloat._456, + OptionalLiteralBool = true, + OptionalNullableList = { 1234 }, + OptionalFloatProperty = (double)default, + OptionalResourceId = new ResourceIdentifier(""), +}, +BinaryData.FromObjectAsJson(new object()), +new Dictionary +{ + ["key"] = BinaryData.FromObjectAsJson(new object()) +}, +new ModelWithRequiredNullableProperties(1234, StringExtensibleEnum.One, StringFixedEnum.One), +new BinaryData[] +{ + BinaryData.FromObjectAsJson("") +}) +{ + IntExtensibleEnum = IntExtensibleEnum.One, + IntExtensibleEnumCollection = { IntExtensibleEnum.One }, + FloatExtensibleEnum = FloatExtensibleEnum.One, + FloatExtensibleEnumCollection = { FloatExtensibleEnum.One }, + FloatFixedEnum = FloatFixedEnum.One, + FloatFixedEnumCollection = { FloatFixedEnum.One }, + IntFixedEnum = IntFixedEnum.One, + IntFixedEnumCollection = { IntFixedEnum.One }, + StringFixedEnum = StringFixedEnum.One, + OptionalUnknown = BinaryData.FromObjectAsJson(new object()), + OptionalRecordUnknown = + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, +}; +Response response = client.HelloAgain("", "", action); +]]> + + + +This sample shows how to call HelloAgainAsync and parse the result. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +using RequestContent content = RequestContent.Create(new +{ + requiredString = "", + requiredInt = 1234, + requiredCollection = new object[] + { + "1" + }, + requiredDictionary = new + { + key = "1", + }, + requiredModel = new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + requiredBadDescription = "", + requiredNullableList = new object[] + { + 1234 + }, + requiredFloatProperty = new object(), + }, + requiredUnknown = new object(), + requiredRecordUnknown = new + { + key = new object(), + }, + modelWithRequiredNullable = new + { + requiredNullablePrimitive = 1234, + requiredExtensibleEnum = "1", + requiredFixedEnum = "1", + }, + unionList = new object[] + { + "" + }, +}); +Response response = await client.HelloAgainAsync("", "", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("requiredString").ToString()); +Console.WriteLine(result.GetProperty("requiredInt").ToString()); +Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); +Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); +Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); +Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); +Console.WriteLine(result.GetProperty("unionList")[0].ToString()); +]]> +This sample shows how to call HelloAgainAsync with all parameters and request content and parse the result. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +using RequestContent content = RequestContent.Create(new +{ + requiredString = "", + requiredInt = 1234, + requiredCollection = new object[] + { + "1" + }, + requiredDictionary = new + { + key = "1", + }, + requiredModel = new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + optionalLiteralString = "reject", + optionalLiteralInt = 456, + optionalLiteralFloat = 4.56F, + optionalLiteralBool = true, + requiredBadDescription = "", + optionalNullableList = new object[] + { + 1234 + }, + requiredNullableList = new object[] + { + 1234 + }, + requiredFloatProperty = new object(), + optionalFloatProperty = new object(), + optionalResourceId = "", + }, + intExtensibleEnum = 1, + intExtensibleEnumCollection = new object[] + { + 1 + }, + floatExtensibleEnum = 1F, + floatExtensibleEnumCollection = new object[] + { + 1F + }, + floatFixedEnum = 1.1F, + floatFixedEnumCollection = new object[] + { + 1.1F + }, + intFixedEnum = 1, + intFixedEnumCollection = new object[] + { + 1 + }, + stringFixedEnum = "1", + requiredUnknown = new object(), + optionalUnknown = new object(), + requiredRecordUnknown = new + { + key = new object(), + }, + optionalRecordUnknown = new + { + key = new object(), + }, + modelWithRequiredNullable = new + { + requiredNullablePrimitive = 1234, + requiredExtensibleEnum = "1", + requiredFixedEnum = "1", + }, + unionList = new object[] + { + "" + }, +}); +Response response = await client.HelloAgainAsync("", "", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("requiredString").ToString()); +Console.WriteLine(result.GetProperty("requiredInt").ToString()); +Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalResourceId").ToString()); +Console.WriteLine(result.GetProperty("intExtensibleEnum").ToString()); +Console.WriteLine(result.GetProperty("intExtensibleEnumCollection")[0].ToString()); +Console.WriteLine(result.GetProperty("floatExtensibleEnum").ToString()); +Console.WriteLine(result.GetProperty("floatExtensibleEnumCollection")[0].ToString()); +Console.WriteLine(result.GetProperty("floatFixedEnum").ToString()); +Console.WriteLine(result.GetProperty("floatFixedEnumCollection")[0].ToString()); +Console.WriteLine(result.GetProperty("intFixedEnum").ToString()); +Console.WriteLine(result.GetProperty("intFixedEnumCollection")[0].ToString()); +Console.WriteLine(result.GetProperty("stringFixedEnum").ToString()); +Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); +Console.WriteLine(result.GetProperty("optionalUnknown").ToString()); +Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("optionalRecordUnknown").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("readOnlyOptionalRecordUnknown").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); +Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); +Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); +Console.WriteLine(result.GetProperty("unionList")[0].ToString()); +]]> + + + +This sample shows how to call HelloAgain and parse the result. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +using RequestContent content = RequestContent.Create(new +{ + requiredString = "", + requiredInt = 1234, + requiredCollection = new object[] + { + "1" + }, + requiredDictionary = new + { + key = "1", + }, + requiredModel = new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + requiredBadDescription = "", + requiredNullableList = new object[] + { + 1234 + }, + requiredFloatProperty = new object(), + }, + requiredUnknown = new object(), + requiredRecordUnknown = new + { + key = new object(), + }, + modelWithRequiredNullable = new + { + requiredNullablePrimitive = 1234, + requiredExtensibleEnum = "1", + requiredFixedEnum = "1", + }, + unionList = new object[] + { + "" + }, +}); +Response response = client.HelloAgain("", "", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("requiredString").ToString()); +Console.WriteLine(result.GetProperty("requiredInt").ToString()); +Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); +Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); +Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); +Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); +Console.WriteLine(result.GetProperty("unionList")[0].ToString()); +]]> +This sample shows how to call HelloAgain with all parameters and request content and parse the result. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +using RequestContent content = RequestContent.Create(new +{ + requiredString = "", + requiredInt = 1234, + requiredCollection = new object[] + { + "1" + }, + requiredDictionary = new + { + key = "1", + }, + requiredModel = new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + optionalLiteralString = "reject", + optionalLiteralInt = 456, + optionalLiteralFloat = 4.56F, + optionalLiteralBool = true, + requiredBadDescription = "", + optionalNullableList = new object[] + { + 1234 + }, + requiredNullableList = new object[] + { + 1234 + }, + requiredFloatProperty = new object(), + optionalFloatProperty = new object(), + optionalResourceId = "", + }, + intExtensibleEnum = 1, + intExtensibleEnumCollection = new object[] + { + 1 + }, + floatExtensibleEnum = 1F, + floatExtensibleEnumCollection = new object[] + { + 1F + }, + floatFixedEnum = 1.1F, + floatFixedEnumCollection = new object[] + { + 1.1F + }, + intFixedEnum = 1, + intFixedEnumCollection = new object[] + { + 1 + }, + stringFixedEnum = "1", + requiredUnknown = new object(), + optionalUnknown = new object(), + requiredRecordUnknown = new + { + key = new object(), + }, + optionalRecordUnknown = new + { + key = new object(), + }, + modelWithRequiredNullable = new + { + requiredNullablePrimitive = 1234, + requiredExtensibleEnum = "1", + requiredFixedEnum = "1", + }, + unionList = new object[] + { + "" + }, +}); +Response response = client.HelloAgain("", "", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("requiredString").ToString()); +Console.WriteLine(result.GetProperty("requiredInt").ToString()); +Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalResourceId").ToString()); +Console.WriteLine(result.GetProperty("intExtensibleEnum").ToString()); +Console.WriteLine(result.GetProperty("intExtensibleEnumCollection")[0].ToString()); +Console.WriteLine(result.GetProperty("floatExtensibleEnum").ToString()); +Console.WriteLine(result.GetProperty("floatExtensibleEnumCollection")[0].ToString()); +Console.WriteLine(result.GetProperty("floatFixedEnum").ToString()); +Console.WriteLine(result.GetProperty("floatFixedEnumCollection")[0].ToString()); +Console.WriteLine(result.GetProperty("intFixedEnum").ToString()); +Console.WriteLine(result.GetProperty("intFixedEnumCollection")[0].ToString()); +Console.WriteLine(result.GetProperty("stringFixedEnum").ToString()); +Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); +Console.WriteLine(result.GetProperty("optionalUnknown").ToString()); +Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("optionalRecordUnknown").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("readOnlyOptionalRecordUnknown").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); +Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); +Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); +Console.WriteLine(result.GetProperty("unionList")[0].ToString()); +]]> + + + +This sample shows how to call NoContentTypeAsync and parse the result. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +using RequestContent content = RequestContent.Create(new +{ + requiredString = "", + requiredInt = 1234, + requiredCollection = new object[] + { + "1" + }, + requiredDictionary = new + { + key = "1", + }, + requiredModel = new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + requiredBadDescription = "", + requiredNullableList = new object[] + { + 1234 + }, + requiredFloatProperty = new object(), + }, + requiredUnknown = new object(), + requiredRecordUnknown = new + { + key = new object(), + }, + modelWithRequiredNullable = new + { + requiredNullablePrimitive = 1234, + requiredExtensibleEnum = "1", + requiredFixedEnum = "1", + }, + unionList = new object[] + { + "" + }, +}); +Response response = await client.NoContentTypeAsync("", "", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("requiredString").ToString()); +Console.WriteLine(result.GetProperty("requiredInt").ToString()); +Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); +Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); +Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); +Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); +Console.WriteLine(result.GetProperty("unionList")[0].ToString()); +]]> +This sample shows how to call NoContentTypeAsync with all parameters and request content and parse the result. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +using RequestContent content = RequestContent.Create(new +{ + requiredString = "", + requiredInt = 1234, + requiredCollection = new object[] + { + "1" + }, + requiredDictionary = new + { + key = "1", + }, + requiredModel = new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + optionalLiteralString = "reject", + optionalLiteralInt = 456, + optionalLiteralFloat = 4.56F, + optionalLiteralBool = true, + requiredBadDescription = "", + optionalNullableList = new object[] + { + 1234 + }, + requiredNullableList = new object[] + { + 1234 + }, + requiredFloatProperty = new object(), + optionalFloatProperty = new object(), + optionalResourceId = "", + }, + intExtensibleEnum = 1, + intExtensibleEnumCollection = new object[] + { + 1 + }, + floatExtensibleEnum = 1F, + floatExtensibleEnumCollection = new object[] + { + 1F + }, + floatFixedEnum = 1.1F, + floatFixedEnumCollection = new object[] + { + 1.1F + }, + intFixedEnum = 1, + intFixedEnumCollection = new object[] + { + 1 + }, + stringFixedEnum = "1", + requiredUnknown = new object(), + optionalUnknown = new object(), + requiredRecordUnknown = new + { + key = new object(), + }, + optionalRecordUnknown = new + { + key = new object(), + }, + modelWithRequiredNullable = new + { + requiredNullablePrimitive = 1234, + requiredExtensibleEnum = "1", + requiredFixedEnum = "1", + }, + unionList = new object[] + { + "" + }, +}); +Response response = await client.NoContentTypeAsync("", "", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("requiredString").ToString()); +Console.WriteLine(result.GetProperty("requiredInt").ToString()); +Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalResourceId").ToString()); +Console.WriteLine(result.GetProperty("intExtensibleEnum").ToString()); +Console.WriteLine(result.GetProperty("intExtensibleEnumCollection")[0].ToString()); +Console.WriteLine(result.GetProperty("floatExtensibleEnum").ToString()); +Console.WriteLine(result.GetProperty("floatExtensibleEnumCollection")[0].ToString()); +Console.WriteLine(result.GetProperty("floatFixedEnum").ToString()); +Console.WriteLine(result.GetProperty("floatFixedEnumCollection")[0].ToString()); +Console.WriteLine(result.GetProperty("intFixedEnum").ToString()); +Console.WriteLine(result.GetProperty("intFixedEnumCollection")[0].ToString()); +Console.WriteLine(result.GetProperty("stringFixedEnum").ToString()); +Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); +Console.WriteLine(result.GetProperty("optionalUnknown").ToString()); +Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("optionalRecordUnknown").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("readOnlyOptionalRecordUnknown").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); +Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); +Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); +Console.WriteLine(result.GetProperty("unionList")[0].ToString()); +]]> + + + +This sample shows how to call NoContentType and parse the result. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +using RequestContent content = RequestContent.Create(new +{ + requiredString = "", + requiredInt = 1234, + requiredCollection = new object[] + { + "1" + }, + requiredDictionary = new + { + key = "1", + }, + requiredModel = new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + requiredBadDescription = "", + requiredNullableList = new object[] + { + 1234 + }, + requiredFloatProperty = new object(), + }, + requiredUnknown = new object(), + requiredRecordUnknown = new + { + key = new object(), + }, + modelWithRequiredNullable = new + { + requiredNullablePrimitive = 1234, + requiredExtensibleEnum = "1", + requiredFixedEnum = "1", + }, + unionList = new object[] + { + "" + }, +}); +Response response = client.NoContentType("", "", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("requiredString").ToString()); +Console.WriteLine(result.GetProperty("requiredInt").ToString()); +Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); +Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); +Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); +Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); +Console.WriteLine(result.GetProperty("unionList")[0].ToString()); +]]> +This sample shows how to call NoContentType with all parameters and request content and parse the result. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +using RequestContent content = RequestContent.Create(new +{ + requiredString = "", + requiredInt = 1234, + requiredCollection = new object[] + { + "1" + }, + requiredDictionary = new + { + key = "1", + }, + requiredModel = new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + optionalLiteralString = "reject", + optionalLiteralInt = 456, + optionalLiteralFloat = 4.56F, + optionalLiteralBool = true, + requiredBadDescription = "", + optionalNullableList = new object[] + { + 1234 + }, + requiredNullableList = new object[] + { + 1234 + }, + requiredFloatProperty = new object(), + optionalFloatProperty = new object(), + optionalResourceId = "", + }, + intExtensibleEnum = 1, + intExtensibleEnumCollection = new object[] + { + 1 + }, + floatExtensibleEnum = 1F, + floatExtensibleEnumCollection = new object[] + { + 1F + }, + floatFixedEnum = 1.1F, + floatFixedEnumCollection = new object[] + { + 1.1F + }, + intFixedEnum = 1, + intFixedEnumCollection = new object[] + { + 1 + }, + stringFixedEnum = "1", + requiredUnknown = new object(), + optionalUnknown = new object(), + requiredRecordUnknown = new + { + key = new object(), + }, + optionalRecordUnknown = new + { + key = new object(), + }, + modelWithRequiredNullable = new + { + requiredNullablePrimitive = 1234, + requiredExtensibleEnum = "1", + requiredFixedEnum = "1", + }, + unionList = new object[] + { + "" + }, +}); +Response response = client.NoContentType("", "", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("requiredString").ToString()); +Console.WriteLine(result.GetProperty("requiredInt").ToString()); +Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalResourceId").ToString()); +Console.WriteLine(result.GetProperty("intExtensibleEnum").ToString()); +Console.WriteLine(result.GetProperty("intExtensibleEnumCollection")[0].ToString()); +Console.WriteLine(result.GetProperty("floatExtensibleEnum").ToString()); +Console.WriteLine(result.GetProperty("floatExtensibleEnumCollection")[0].ToString()); +Console.WriteLine(result.GetProperty("floatFixedEnum").ToString()); +Console.WriteLine(result.GetProperty("floatFixedEnumCollection")[0].ToString()); +Console.WriteLine(result.GetProperty("intFixedEnum").ToString()); +Console.WriteLine(result.GetProperty("intFixedEnumCollection")[0].ToString()); +Console.WriteLine(result.GetProperty("stringFixedEnum").ToString()); +Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); +Console.WriteLine(result.GetProperty("optionalUnknown").ToString()); +Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("optionalRecordUnknown").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("readOnlyOptionalRecordUnknown").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); +Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); +Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); +Console.WriteLine(result.GetProperty("unionList")[0].ToString()); +]]> + + + +This sample shows how to call HelloDemoAgainAsync. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +Response response = await client.HelloDemoAgainAsync(); +]]> +This sample shows how to call HelloDemoAgainAsync with all parameters. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +Response response = await client.HelloDemoAgainAsync(); +]]> + + + +This sample shows how to call HelloDemoAgain. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +Response response = client.HelloDemoAgain(); +]]> +This sample shows how to call HelloDemoAgain with all parameters. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +Response response = client.HelloDemoAgain(); +]]> + + + +This sample shows how to call HelloDemoAgainAsync and parse the result. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +Response response = await client.HelloDemoAgainAsync(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +]]> +This sample shows how to call HelloDemoAgainAsync with all parameters and parse the result. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +Response response = await client.HelloDemoAgainAsync(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); +]]> + + + +This sample shows how to call HelloDemoAgain and parse the result. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +Response response = client.HelloDemoAgain(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +]]> +This sample shows how to call HelloDemoAgain with all parameters and parse the result. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +Response response = client.HelloDemoAgain(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); +]]> + + + +This sample shows how to call CreateLiteralAsync. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +Thing body = new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default); +Response response = await client.CreateLiteralAsync(body); +]]> +This sample shows how to call CreateLiteralAsync with all parameters. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +Thing body = new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default) +{ + OptionalLiteralString = ThingOptionalLiteralString.Reject, + OptionalLiteralInt = ThingOptionalLiteralInt._456, + OptionalLiteralFloat = ThingOptionalLiteralFloat._456, + OptionalLiteralBool = true, + OptionalNullableList = { 1234 }, + OptionalFloatProperty = (double)default, + OptionalResourceId = new ResourceIdentifier(""), +}; +Response response = await client.CreateLiteralAsync(body); +]]> + + + +This sample shows how to call CreateLiteral. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +Thing body = new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default); +Response response = client.CreateLiteral(body); +]]> +This sample shows how to call CreateLiteral with all parameters. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +Thing body = new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default) +{ + OptionalLiteralString = ThingOptionalLiteralString.Reject, + OptionalLiteralInt = ThingOptionalLiteralInt._456, + OptionalLiteralFloat = ThingOptionalLiteralFloat._456, + OptionalLiteralBool = true, + OptionalNullableList = { 1234 }, + OptionalFloatProperty = (double)default, + OptionalResourceId = new ResourceIdentifier(""), +}; +Response response = client.CreateLiteral(body); +]]> + + + +This sample shows how to call CreateLiteralAsync and parse the result. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +using RequestContent content = RequestContent.Create(new +{ + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + requiredBadDescription = "", + requiredNullableList = new object[] + { + 1234 + }, + requiredFloatProperty = new object(), +}); +Response response = await client.CreateLiteralAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +]]> +This sample shows how to call CreateLiteralAsync with all request content and parse the result. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +using RequestContent content = RequestContent.Create(new +{ + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + optionalLiteralString = "reject", + optionalLiteralInt = 456, + optionalLiteralFloat = 4.56F, + optionalLiteralBool = true, + requiredBadDescription = "", + optionalNullableList = new object[] + { + 1234 + }, + requiredNullableList = new object[] + { + 1234 + }, + requiredFloatProperty = new object(), + optionalFloatProperty = new object(), + optionalResourceId = "", +}); +Response response = await client.CreateLiteralAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); +]]> + + + +This sample shows how to call CreateLiteral and parse the result. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +using RequestContent content = RequestContent.Create(new +{ + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + requiredBadDescription = "", + requiredNullableList = new object[] + { + 1234 + }, + requiredFloatProperty = new object(), +}); +Response response = client.CreateLiteral(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +]]> +This sample shows how to call CreateLiteral with all request content and parse the result. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +using RequestContent content = RequestContent.Create(new +{ + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + optionalLiteralString = "reject", + optionalLiteralInt = 456, + optionalLiteralFloat = 4.56F, + optionalLiteralBool = true, + requiredBadDescription = "", + optionalNullableList = new object[] + { + 1234 + }, + requiredNullableList = new object[] + { + 1234 + }, + requiredFloatProperty = new object(), + optionalFloatProperty = new object(), + optionalResourceId = "", +}); +Response response = client.CreateLiteral(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); +]]> + + + +This sample shows how to call HelloLiteralAsync. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +Response response = await client.HelloLiteralAsync(); +]]> +This sample shows how to call HelloLiteralAsync with all parameters. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +Response response = await client.HelloLiteralAsync(); +]]> + + + +This sample shows how to call HelloLiteral. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +Response response = client.HelloLiteral(); +]]> +This sample shows how to call HelloLiteral with all parameters. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +Response response = client.HelloLiteral(); +]]> + + + +This sample shows how to call HelloLiteralAsync and parse the result. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +Response response = await client.HelloLiteralAsync(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +]]> +This sample shows how to call HelloLiteralAsync with all parameters and parse the result. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +Response response = await client.HelloLiteralAsync(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); +]]> + + + +This sample shows how to call HelloLiteral and parse the result. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +Response response = client.HelloLiteral(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +]]> +This sample shows how to call HelloLiteral with all parameters and parse the result. +"); +HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + +Response response = client.HelloLiteral(null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("requiredUnion").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); +Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); +Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); +Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); +Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); +Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); +]]> + + + \ No newline at end of file diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Entity.cs b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Entity.cs index 9fe6984271d..e69a5e2a816 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Entity.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Entity.cs @@ -57,6 +57,7 @@ internal Entity(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Azur /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. + /// public virtual async Task> DoSomethingAsync(string p2, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(p2, nameof(p2)); @@ -71,6 +72,7 @@ public virtual async Task> DoSomethingAsync(string p2, Cancellat /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. + /// public virtual Response DoSomething(string p2, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(p2, nameof(p2)); @@ -101,6 +103,7 @@ public virtual Response DoSomething(string p2, CancellationToken cancella /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task DoSomethingAsync(string p2, RequestContext context) { Argument.AssertNotNullOrEmpty(p2, nameof(p2)); @@ -140,6 +143,7 @@ public virtual async Task DoSomethingAsync(string p2, RequestContext c /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response DoSomething(string p2, RequestContext context) { Argument.AssertNotNullOrEmpty(p2, nameof(p2)); diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/EnumTest.cs b/test/TestProjects/FirstTest-TypeSpec/src/Generated/EnumTest.cs index 1302d68d9b4..d11366c4b67 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/EnumTest.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/EnumTest.cs @@ -65,6 +65,7 @@ internal EnumTest(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Az /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task CreateUnknownValueAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -98,6 +99,7 @@ public virtual async Task CreateUnknownValueAsync(RequestContent conte /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response CreateUnknownValue(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/FirstTestTypeSpecClient.cs b/test/TestProjects/FirstTest-TypeSpec/src/Generated/FirstTestTypeSpecClient.cs index eea706dd8e7..2f8f8bd9f93 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/FirstTestTypeSpecClient.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/FirstTestTypeSpecClient.cs @@ -196,6 +196,7 @@ public virtual Response TopAction(DateTimeOffset action, RequestContext context) /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task TopAction2Async(RequestContext context) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.TopAction2"); @@ -225,6 +226,7 @@ public virtual async Task TopAction2Async(RequestContext context) /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response TopAction2(RequestContext context) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.TopAction2"); @@ -256,6 +258,7 @@ public virtual Response TopAction2(RequestContext context) /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task PatchActionAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -289,6 +292,7 @@ public virtual async Task PatchActionAsync(RequestContent content, Req /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response PatchAction(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -326,6 +330,7 @@ public virtual Response PatchAction(RequestContent content, RequestContext conte /// optional arm id. /// The cancellation token to use. /// , or is null. + /// public virtual async Task> AnonymousBodyAsync(string name, BinaryData requiredUnion, string requiredBadDescription, IEnumerable requiredNullableList, double requiredFloatProperty, AnonymousBodyRequestRequiredLiteralString requiredLiteralString, AnonymousBodyRequestRequiredLiteralInt requiredLiteralInt, AnonymousBodyRequestRequiredLiteralFloat requiredLiteralFloat, bool requiredLiteralBool, AnonymousBodyRequestOptionalLiteralString? optionalLiteralString = null, AnonymousBodyRequestOptionalLiteralInt? optionalLiteralInt = null, AnonymousBodyRequestOptionalLiteralFloat? optionalLiteralFloat = null, bool? optionalLiteralBool = null, IEnumerable optionalNullableList = null, double? optionalFloatProperty = null, ResourceIdentifier optionalResourceId = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(name, nameof(name)); @@ -374,6 +379,7 @@ public virtual async Task> AnonymousBodyAsync(string name, Binar /// optional arm id. /// The cancellation token to use. /// , or is null. + /// public virtual Response AnonymousBody(string name, BinaryData requiredUnion, string requiredBadDescription, IEnumerable requiredNullableList, double requiredFloatProperty, AnonymousBodyRequestRequiredLiteralString requiredLiteralString, AnonymousBodyRequestRequiredLiteralInt requiredLiteralInt, AnonymousBodyRequestRequiredLiteralFloat requiredLiteralFloat, bool requiredLiteralBool, AnonymousBodyRequestOptionalLiteralString? optionalLiteralString = null, AnonymousBodyRequestOptionalLiteralInt? optionalLiteralInt = null, AnonymousBodyRequestOptionalLiteralFloat? optionalLiteralFloat = null, bool? optionalLiteralBool = null, IEnumerable optionalNullableList = null, double? optionalFloatProperty = null, ResourceIdentifier optionalResourceId = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(name, nameof(name)); @@ -423,6 +429,7 @@ public virtual Response AnonymousBody(string name, BinaryData requiredUni /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task AnonymousBodyAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -461,6 +468,7 @@ public virtual async Task AnonymousBodyAsync(RequestContent content, R /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response AnonymousBody(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -483,6 +491,7 @@ public virtual Response AnonymousBody(RequestContent content, RequestContext con /// name of the NotFriend. /// The cancellation token to use. /// is null. + /// public virtual async Task> FriendlyModelAsync(string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(name, nameof(name)); @@ -497,6 +506,7 @@ public virtual async Task> FriendlyModelAsync(string name, Canc /// name of the NotFriend. /// The cancellation token to use. /// is null. + /// public virtual Response FriendlyModel(string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(name, nameof(name)); @@ -527,6 +537,7 @@ public virtual Response FriendlyModel(string name, CancellationToken can /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task FriendlyModelAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -565,6 +576,7 @@ public virtual async Task FriendlyModelAsync(RequestContent content, R /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response FriendlyModel(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -596,6 +608,7 @@ public virtual Response FriendlyModel(RequestContent content, RequestContext con /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task AddTimeHeaderAsync(RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.AddTimeHeader"); @@ -625,6 +638,7 @@ public virtual async Task AddTimeHeaderAsync(RequestContext context = /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response AddTimeHeader(RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.AddTimeHeader"); @@ -646,6 +660,7 @@ public virtual Response AddTimeHeader(RequestContext context = null) /// The to use. /// The cancellation token to use. /// is null. + /// public virtual async Task StringFormatAsync(Guid subscriptionId, ModelWithFormat body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); @@ -661,6 +676,7 @@ public virtual async Task StringFormatAsync(Guid subscriptionId, Model /// The to use. /// The cancellation token to use. /// is null. + /// public virtual Response StringFormat(Guid subscriptionId, ModelWithFormat body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); @@ -692,6 +708,7 @@ public virtual Response StringFormat(Guid subscriptionId, ModelWithFormat body, /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task StringFormatAsync(Guid subscriptionId, RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -731,6 +748,7 @@ public virtual async Task StringFormatAsync(Guid subscriptionId, Reque /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response StringFormat(Guid subscriptionId, RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -753,6 +771,7 @@ public virtual Response StringFormat(Guid subscriptionId, RequestContent content /// name of the ModelWithProjectedName. /// The cancellation token to use. /// is null. + /// public virtual async Task> ProjectedNameModelAsync(string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(name, nameof(name)); @@ -767,6 +786,7 @@ public virtual async Task> ProjectedNameModelAsync(stri /// name of the ModelWithProjectedName. /// The cancellation token to use. /// is null. + /// public virtual Response ProjectedNameModel(string name, CancellationToken cancellationToken = default) { Argument.AssertNotNull(name, nameof(name)); @@ -797,6 +817,7 @@ public virtual Response ProjectedNameModel(string name, Cancella /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task ProjectedNameModelAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -835,6 +856,7 @@ public virtual async Task ProjectedNameModelAsync(RequestContent conte /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response ProjectedNameModel(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -855,6 +877,7 @@ public virtual Response ProjectedNameModel(RequestContent content, RequestContex /// return anonymous model. /// The cancellation token to use. + /// public virtual async Task> ReturnsAnonymousModelAsync(CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); @@ -864,6 +887,7 @@ public virtual async Task> ReturnsAnonym /// return anonymous model. /// The cancellation token to use. + /// public virtual Response ReturnsAnonymousModel(CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); @@ -889,6 +913,7 @@ public virtual Response ReturnsAnonymousModel(Can /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task ReturnsAnonymousModelAsync(RequestContext context) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.ReturnsAnonymousModel"); @@ -923,6 +948,7 @@ public virtual async Task ReturnsAnonymousModelAsync(RequestContext co /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response ReturnsAnonymousModel(RequestContext context) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.ReturnsAnonymousModel"); @@ -956,6 +982,7 @@ public virtual Response ReturnsAnonymousModel(RequestContext context) /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task> HeadAsBooleanAsync(string id, RequestContext context = null) { Argument.AssertNotNullOrEmpty(id, nameof(id)); @@ -991,6 +1018,7 @@ public virtual async Task> HeadAsBooleanAsync(string id, RequestC /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response HeadAsBoolean(string id, RequestContext context = null) { Argument.AssertNotNullOrEmpty(id, nameof(id)); @@ -1014,6 +1042,7 @@ public virtual Response HeadAsBoolean(string id, RequestContext context = /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. + /// public virtual async Task StringBodyAsync(string body, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(body, nameof(body)); @@ -1029,6 +1058,7 @@ public virtual async Task StringBodyAsync(string body, CancellationTok /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. + /// public virtual Response StringBody(string body, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(body, nameof(body)); @@ -1059,6 +1089,7 @@ public virtual Response StringBody(string body, CancellationToken cancellationTo /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task StringBodyAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -1097,6 +1128,7 @@ public virtual async Task StringBodyAsync(RequestContent content, Requ /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response StringBody(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -1118,6 +1150,7 @@ public virtual Response StringBody(RequestContent content, RequestContext contex /// The body parameter type is bool. /// The to use. /// The cancellation token to use. + /// public virtual async Task BoolBodyAsync(bool body, CancellationToken cancellationToken = default) { using RequestContent content = RequestContentHelper.FromObject(body); @@ -1129,6 +1162,7 @@ public virtual async Task BoolBodyAsync(bool body, CancellationToken c /// The body parameter type is bool. /// The to use. /// The cancellation token to use. + /// public virtual Response BoolBody(bool body, CancellationToken cancellationToken = default) { using RequestContent content = RequestContentHelper.FromObject(body); @@ -1157,6 +1191,7 @@ public virtual Response BoolBody(bool body, CancellationToken cancellationToken /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task BoolBodyAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -1195,6 +1230,7 @@ public virtual async Task BoolBodyAsync(RequestContent content, Reques /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response BoolBody(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -1216,6 +1252,7 @@ public virtual Response BoolBody(RequestContent content, RequestContext context /// The body parameter type is datetime. /// The to use. /// The cancellation token to use. + /// public virtual async Task DateTimeBodyAsync(DateTimeOffset body, CancellationToken cancellationToken = default) { using RequestContent content = RequestContentHelper.FromObject(body); @@ -1227,6 +1264,7 @@ public virtual async Task DateTimeBodyAsync(DateTimeOffset body, Cance /// The body parameter type is datetime. /// The to use. /// The cancellation token to use. + /// public virtual Response DateTimeBody(DateTimeOffset body, CancellationToken cancellationToken = default) { using RequestContent content = RequestContentHelper.FromObject(body); @@ -1255,6 +1293,7 @@ public virtual Response DateTimeBody(DateTimeOffset body, CancellationToken canc /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task DateTimeBodyAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -1293,6 +1332,7 @@ public virtual async Task DateTimeBodyAsync(RequestContent content, Re /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response DateTimeBody(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -1313,6 +1353,7 @@ public virtual Response DateTimeBody(RequestContent content, RequestContext cont /// The return type is datetime. /// The cancellation token to use. + /// public virtual async Task> ReturnStringAsync(CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); @@ -1322,6 +1363,7 @@ public virtual async Task> ReturnStringAsync(CancellationToken /// The return type is datetime. /// The cancellation token to use. + /// public virtual Response ReturnString(CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); @@ -1347,6 +1389,7 @@ public virtual Response ReturnString(CancellationToken cancellationToken /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task ReturnStringAsync(RequestContext context) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.ReturnString"); @@ -1381,6 +1424,7 @@ public virtual async Task ReturnStringAsync(RequestContext context) /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response ReturnString(RequestContext context) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.ReturnString"); @@ -1399,6 +1443,7 @@ public virtual Response ReturnString(RequestContext context) /// Return unknown. /// The cancellation token to use. + /// public virtual async Task> ReturnUnknownAsync(CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); @@ -1408,6 +1453,7 @@ public virtual async Task> ReturnUnknownAsync(CancellationT /// Return unknown. /// The cancellation token to use. + /// public virtual Response ReturnUnknown(CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); @@ -1433,6 +1479,7 @@ public virtual Response ReturnUnknown(CancellationToken cancellation /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task ReturnUnknownAsync(RequestContext context) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.ReturnUnknown"); @@ -1467,6 +1514,7 @@ public virtual async Task ReturnUnknownAsync(RequestContext context) /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response ReturnUnknown(RequestContext context) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.ReturnUnknown"); @@ -1487,6 +1535,7 @@ public virtual Response ReturnUnknown(RequestContext context) /// The to use. /// The cancellation token to use. /// is null. + /// public virtual async Task RecursiveExtensionAsync(Extension input, CancellationToken cancellationToken = default) { Argument.AssertNotNull(input, nameof(input)); @@ -1501,6 +1550,7 @@ public virtual async Task RecursiveExtensionAsync(Extension input, Can /// The to use. /// The cancellation token to use. /// is null. + /// public virtual Response RecursiveExtension(Extension input, CancellationToken cancellationToken = default) { Argument.AssertNotNull(input, nameof(input)); @@ -1531,6 +1581,7 @@ public virtual Response RecursiveExtension(Extension input, CancellationToken ca /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task RecursiveExtensionAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -1569,6 +1620,7 @@ public virtual async Task RecursiveExtensionAsync(RequestContent conte /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response RecursiveExtension(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -1591,6 +1643,7 @@ public virtual Response RecursiveExtension(RequestContent content, RequestContex /// The to use. /// The cancellation token to use. /// is null. + /// public virtual async Task ThreeLevelRecursiveAsync(Extendible input, CancellationToken cancellationToken = default) { Argument.AssertNotNull(input, nameof(input)); @@ -1605,6 +1658,7 @@ public virtual async Task ThreeLevelRecursiveAsync(Extendible input, C /// The to use. /// The cancellation token to use. /// is null. + /// public virtual Response ThreeLevelRecursive(Extendible input, CancellationToken cancellationToken = default) { Argument.AssertNotNull(input, nameof(input)); @@ -1635,6 +1689,7 @@ public virtual Response ThreeLevelRecursive(Extendible input, CancellationToken /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task ThreeLevelRecursiveAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -1673,6 +1728,7 @@ public virtual async Task ThreeLevelRecursiveAsync(RequestContent cont /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response ThreeLevelRecursive(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -1695,6 +1751,7 @@ public virtual Response ThreeLevelRecursive(RequestContent content, RequestConte /// The to use. /// The cancellation token to use. /// is null. + /// public virtual async Task RecursiveModelsAsync(ChildModel input, CancellationToken cancellationToken = default) { Argument.AssertNotNull(input, nameof(input)); @@ -1709,6 +1766,7 @@ public virtual async Task RecursiveModelsAsync(ChildModel input, Cance /// The to use. /// The cancellation token to use. /// is null. + /// public virtual Response RecursiveModels(ChildModel input, CancellationToken cancellationToken = default) { Argument.AssertNotNull(input, nameof(input)); @@ -1739,6 +1797,7 @@ public virtual Response RecursiveModels(ChildModel input, CancellationToken canc /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task RecursiveModelsAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -1777,6 +1836,7 @@ public virtual async Task RecursiveModelsAsync(RequestContent content, /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response RecursiveModels(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -1799,6 +1859,7 @@ public virtual Response RecursiveModels(RequestContent content, RequestContext c /// The to use. /// The cancellation token to use. /// is null. + /// public virtual async Task ContainSelfModelsAsync(ContainSelf input, CancellationToken cancellationToken = default) { Argument.AssertNotNull(input, nameof(input)); @@ -1813,6 +1874,7 @@ public virtual async Task ContainSelfModelsAsync(ContainSelf input, Ca /// The to use. /// The cancellation token to use. /// is null. + /// public virtual Response ContainSelfModels(ContainSelf input, CancellationToken cancellationToken = default) { Argument.AssertNotNull(input, nameof(input)); @@ -1843,6 +1905,7 @@ public virtual Response ContainSelfModels(ContainSelf input, CancellationToken c /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task ContainSelfModelsAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -1881,6 +1944,7 @@ public virtual async Task ContainSelfModelsAsync(RequestContent conten /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response ContainSelfModels(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -1902,6 +1966,7 @@ public virtual Response ContainSelfModels(RequestContent content, RequestContext /// test enum parameter. /// The to use. /// The cancellation token to use. + /// public virtual async Task EnumParameterAsync(CsProjectedEnum p1, CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); @@ -1912,6 +1977,7 @@ public virtual async Task EnumParameterAsync(CsProjectedEnum p1, Cance /// test enum parameter. /// The to use. /// The cancellation token to use. + /// public virtual Response EnumParameter(CsProjectedEnum p1, CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); @@ -1938,6 +2004,7 @@ public virtual Response EnumParameter(CsProjectedEnum p1, CancellationToken canc /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task EnumParameterAsync(float p1, RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.EnumParameter"); @@ -1973,6 +2040,7 @@ public virtual async Task EnumParameterAsync(float p1, RequestContext /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response EnumParameter(float p1, RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.EnumParameter"); @@ -1993,6 +2061,7 @@ public virtual Response EnumParameter(float p1, RequestContext context = null) /// The to use. /// The cancellation token to use. /// is null. + /// public virtual async Task BodyIsModelWithProjectedEnumAsync(ModelWithProjectedEnum body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); @@ -2007,6 +2076,7 @@ public virtual async Task BodyIsModelWithProjectedEnumAsync(ModelWithP /// The to use. /// The cancellation token to use. /// is null. + /// public virtual Response BodyIsModelWithProjectedEnum(ModelWithProjectedEnum body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); @@ -2037,6 +2107,7 @@ public virtual Response BodyIsModelWithProjectedEnum(ModelWithProjectedEnum body /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task BodyIsModelWithProjectedEnumAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -2075,6 +2146,7 @@ public virtual async Task BodyIsModelWithProjectedEnumAsync(RequestCon /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response BodyIsModelWithProjectedEnum(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -2096,6 +2168,7 @@ public virtual Response BodyIsModelWithProjectedEnum(RequestContent content, Req /// test optional dictionary. /// The where TKey is of type , where TValue is of type to use. /// The cancellation token to use. + /// public virtual async Task OptionalDictionaryAsync(IDictionary body = null, CancellationToken cancellationToken = default) { using RequestContent content = body != null ? RequestContentHelper.FromDictionary(body) : null; @@ -2107,6 +2180,7 @@ public virtual async Task OptionalDictionaryAsync(IDictionary test optional dictionary.

/// The where TKey is of type , where TValue is of type to use. /// The cancellation token to use. + /// public virtual Response OptionalDictionary(IDictionary body = null, CancellationToken cancellationToken = default) { using RequestContent content = body != null ? RequestContentHelper.FromDictionary(body) : null; @@ -2134,6 +2208,7 @@ public virtual Response OptionalDictionary(IDictionary body = null, /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task OptionalDictionaryAsync(RequestContent content, RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.OptionalDictionary"); @@ -2169,6 +2244,7 @@ public virtual async Task OptionalDictionaryAsync(RequestContent conte /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response OptionalDictionary(RequestContent content, RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.OptionalDictionary"); @@ -2190,6 +2266,7 @@ public virtual Response OptionalDictionary(RequestContent content, RequestContex /// The to use. /// The to use. /// The cancellation token to use. + /// public virtual async Task AzureLocationOpAsync(AzureLocation location, AzureLocation regenLocation, AzureLocationModel body = null, CancellationToken cancellationToken = default) { using RequestContent content = body?.ToRequestContent(); @@ -2203,6 +2280,7 @@ public virtual async Task AzureLocationOpAsync(AzureLocation location, /// The to use. /// The to use. /// The cancellation token to use. + /// public virtual Response AzureLocationOp(AzureLocation location, AzureLocation regenLocation, AzureLocationModel body = null, CancellationToken cancellationToken = default) { using RequestContent content = body?.ToRequestContent(); @@ -2232,6 +2310,7 @@ public virtual Response AzureLocationOp(AzureLocation location, AzureLocation re /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task AzureLocationOpAsync(AzureLocation location, AzureLocation regenLocation, RequestContent content, RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.AzureLocationOp"); @@ -2269,6 +2348,7 @@ public virtual async Task AzureLocationOpAsync(AzureLocation location, /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response AzureLocationOp(AzureLocation location, AzureLocation regenLocation, RequestContent content, RequestContext context = null) { using var scope = ClientDiagnostics.CreateScope("FirstTestTypeSpecClient.AzureLocationOp"); diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Glossary.cs b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Glossary.cs index 1bb9d8fc290..8ac6f9a7af6 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/Glossary.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/Glossary.cs @@ -58,6 +58,7 @@ internal Glossary(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Az /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. + /// public virtual async Task> DoSomethingAsync(string id, string h1, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(id, nameof(id)); @@ -74,6 +75,7 @@ public virtual async Task> DoSomethingAsync(string id, string h1 /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. + /// public virtual Response DoSomething(string id, string h1, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(id, nameof(id)); @@ -106,6 +108,7 @@ public virtual Response DoSomething(string id, string h1, CancellationTok /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task DoSomethingAsync(string id, string h1, RequestContext context) { Argument.AssertNotNullOrEmpty(id, nameof(id)); @@ -147,6 +150,7 @@ public virtual async Task DoSomethingAsync(string id, string h1, Reque /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response DoSomething(string id, string h1, RequestContext context) { Argument.AssertNotNullOrEmpty(id, nameof(id)); diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/HelloDemo.cs b/test/TestProjects/FirstTest-TypeSpec/src/Generated/HelloDemo.cs index 933dac61cb3..63613a534e2 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/HelloDemo.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/HelloDemo.cs @@ -67,6 +67,7 @@ internal HelloDemo(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, A /// or is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task SayHiAsync(string headParameter, string queryParameter, string optionalQuery, RequestContext context) { Argument.AssertNotNull(headParameter, nameof(headParameter)); @@ -103,6 +104,7 @@ public virtual async Task SayHiAsync(string headParameter, string quer /// or is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response SayHi(string headParameter, string queryParameter, string optionalQuery, RequestContext context) { Argument.AssertNotNull(headParameter, nameof(headParameter)); diff --git a/test/TestProjects/FirstTest-TypeSpec/src/Generated/HelloDemo2.cs b/test/TestProjects/FirstTest-TypeSpec/src/Generated/HelloDemo2.cs index fc7d0d23df2..993f2260f1a 100644 --- a/test/TestProjects/FirstTest-TypeSpec/src/Generated/HelloDemo2.cs +++ b/test/TestProjects/FirstTest-TypeSpec/src/Generated/HelloDemo2.cs @@ -59,6 +59,7 @@ internal HelloDemo2(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, /// The cancellation token to use. /// , or is null. /// is an empty string, and was expected to be non-empty. + /// public virtual async Task> HelloAgainAsync(string p2, string p1, RoundTripModel action, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(p2, nameof(p2)); @@ -78,6 +79,7 @@ public virtual async Task> HelloAgainAsync(string p2, s /// The cancellation token to use. /// , or is null. /// is an empty string, and was expected to be non-empty. + /// public virtual Response HelloAgain(string p2, string p1, RoundTripModel action, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(p2, nameof(p2)); @@ -113,6 +115,7 @@ public virtual Response HelloAgain(string p2, string p1, RoundTr /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task HelloAgainAsync(string p2, string p1, RequestContent content, RequestContext context = null) { Argument.AssertNotNullOrEmpty(p2, nameof(p2)); @@ -156,6 +159,7 @@ public virtual async Task HelloAgainAsync(string p2, string p1, Reques /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response HelloAgain(string p2, string p1, RequestContent content, RequestContext context = null) { Argument.AssertNotNullOrEmpty(p2, nameof(p2)); @@ -194,6 +198,7 @@ public virtual Response HelloAgain(string p2, string p1, RequestContent content, /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task NoContentTypeAsync(string p2, string p1, RequestContent content, RequestContext context = null) { Argument.AssertNotNullOrEmpty(p2, nameof(p2)); @@ -232,6 +237,7 @@ public virtual async Task NoContentTypeAsync(string p2, string p1, Req /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response NoContentType(string p2, string p1, RequestContent content, RequestContext context = null) { Argument.AssertNotNullOrEmpty(p2, nameof(p2)); @@ -254,6 +260,7 @@ public virtual Response NoContentType(string p2, string p1, RequestContent conte /// Return hi in demo2. /// The cancellation token to use. + /// public virtual async Task> HelloDemoAgainAsync(CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); @@ -263,6 +270,7 @@ public virtual async Task> HelloDemoAgainAsync(CancellationToken /// Return hi in demo2. /// The cancellation token to use. + /// public virtual Response HelloDemoAgain(CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); @@ -288,6 +296,7 @@ public virtual Response HelloDemoAgain(CancellationToken cancellationToke /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task HelloDemoAgainAsync(RequestContext context) { using var scope = ClientDiagnostics.CreateScope("HelloDemo2.HelloDemoAgain"); @@ -322,6 +331,7 @@ public virtual async Task HelloDemoAgainAsync(RequestContext context) /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response HelloDemoAgain(RequestContext context) { using var scope = ClientDiagnostics.CreateScope("HelloDemo2.HelloDemoAgain"); @@ -342,6 +352,7 @@ public virtual Response HelloDemoAgain(RequestContext context) /// The to use. /// The cancellation token to use. /// is null. + /// public virtual async Task> CreateLiteralAsync(Thing body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); @@ -356,6 +367,7 @@ public virtual async Task> CreateLiteralAsync(Thing body, Cancel /// The to use. /// The cancellation token to use. /// is null. + /// public virtual Response CreateLiteral(Thing body, CancellationToken cancellationToken = default) { Argument.AssertNotNull(body, nameof(body)); @@ -386,6 +398,7 @@ public virtual Response CreateLiteral(Thing body, CancellationToken cance /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task CreateLiteralAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -424,6 +437,7 @@ public virtual async Task CreateLiteralAsync(RequestContent content, R /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response CreateLiteral(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -444,6 +458,7 @@ public virtual Response CreateLiteral(RequestContent content, RequestContext con /// Send literal parameters. /// The cancellation token to use. + /// public virtual async Task> HelloLiteralAsync(CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); @@ -453,6 +468,7 @@ public virtual async Task> HelloLiteralAsync(CancellationToken c /// Send literal parameters. /// The cancellation token to use. + /// public virtual Response HelloLiteral(CancellationToken cancellationToken = default) { RequestContext context = FromCancellationToken(cancellationToken); @@ -478,6 +494,7 @@ public virtual Response HelloLiteral(CancellationToken cancellationToken /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task HelloLiteralAsync(RequestContext context) { using var scope = ClientDiagnostics.CreateScope("HelloDemo2.HelloLiteral"); @@ -512,6 +529,7 @@ public virtual async Task HelloLiteralAsync(RequestContext context) /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response HelloLiteral(RequestContext context) { using var scope = ClientDiagnostics.CreateScope("HelloDemo2.HelloLiteral"); diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_Entity.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_Entity.cs new file mode 100644 index 00000000000..52f00269dd5 --- /dev/null +++ b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_Entity.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure; +using Azure.Identity; +using FirstTestTypeSpec.Models; +using NUnit.Framework; + +namespace FirstTestTypeSpec.Samples +{ + public partial class Samples_Entity + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_DoSomething_ShortVersion() + { + Uri endpoint = new Uri(""); + Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); + + Response response = client.DoSomething("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_DoSomething_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); + + Response response = await client.DoSomethingAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_DoSomething_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); + + Response response = client.DoSomething(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_DoSomething_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); + + Response response = await client.DoSomethingAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_DoSomething_AllParameters() + { + Uri endpoint = new Uri(""); + Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); + + Response response = client.DoSomething("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_DoSomething_AllParameters_Async() + { + Uri endpoint = new Uri(""); + Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); + + Response response = await client.DoSomethingAsync("", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Entity_DoSomething_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); + + Response response = client.DoSomething(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Entity_DoSomething_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + Entity client = new FirstTestTypeSpecClient(endpoint).GetEntityClient(); + + Response response = await client.DoSomethingAsync(""); + } + } +} diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_EnumTest.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_EnumTest.cs new file mode 100644 index 00000000000..d969afd51f3 --- /dev/null +++ b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_EnumTest.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace FirstTestTypeSpec.Samples +{ + public partial class Samples_EnumTest + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EnumTest_CreateUnknownValue_ShortVersion() + { + Uri endpoint = new Uri(""); + EnumTest client = new FirstTestTypeSpecClient(endpoint).GetEnumTestClient(); + + using RequestContent content = RequestContent.Create("Monday"); + Response response = client.CreateUnknownValue(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EnumTest_CreateUnknownValue_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + EnumTest client = new FirstTestTypeSpecClient(endpoint).GetEnumTestClient(); + + using RequestContent content = RequestContent.Create("Monday"); + Response response = await client.CreateUnknownValueAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_EnumTest_CreateUnknownValue_AllParameters() + { + Uri endpoint = new Uri(""); + EnumTest client = new FirstTestTypeSpecClient(endpoint).GetEnumTestClient(); + + using RequestContent content = RequestContent.Create("Monday"); + Response response = client.CreateUnknownValue(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_EnumTest_CreateUnknownValue_AllParameters_Async() + { + Uri endpoint = new Uri(""); + EnumTest client = new FirstTestTypeSpecClient(endpoint).GetEnumTestClient(); + + using RequestContent content = RequestContent.Create("Monday"); + Response response = await client.CreateUnknownValueAsync(content); + + Console.WriteLine(response.Status); + } + } +} diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_FirstTestTypeSpecClient.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_FirstTestTypeSpecClient.cs index 6d57c2092cf..eade47ce3a9 100644 --- a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_FirstTestTypeSpecClient.cs +++ b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_FirstTestTypeSpecClient.cs @@ -6,9 +6,11 @@ #nullable disable using System; +using System.Collections.Generic; using System.Text.Json; using System.Threading.Tasks; using Azure; +using Azure.Core; using Azure.Identity; using FirstTestTypeSpec.Models; using NUnit.Framework; @@ -19,12 +21,12 @@ public partial class Samples_FirstTestTypeSpecClient { [Test] [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_TopAction_ForTestTopAction() + public void Example_FirstTestTypeSpec_TopAction_ShortVersion() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - Response response = client.TopAction(DateTimeOffset.Parse("2024-05-06T12:20-12Z"), null); + Response response = client.TopAction(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -40,12 +42,12 @@ public void Example_FirstTestTypeSpec_TopAction_ForTestTopAction() [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_TopAction_ForTestTopAction_Async() + public async Task Example_FirstTestTypeSpec_TopAction_ShortVersion_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - Response response = await client.TopActionAsync(DateTimeOffset.Parse("2024-05-06T12:20-12Z"), null); + Response response = await client.TopActionAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("name").ToString()); @@ -61,22 +63,2468 @@ public async Task Example_FirstTestTypeSpec_TopAction_ForTestTopAction_Async() [Test] [Ignore("Only validating compilation of examples")] - public void Example_FirstTestTypeSpec_TopAction_ForTestTopAction_Convenience() + public void Example_FirstTestTypeSpec_TopAction_ShortVersion_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - Response response = client.TopAction(DateTimeOffset.Parse("2024-05-06T12:20-12Z")); + Response response = client.TopAction(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Example_FirstTestTypeSpec_TopAction_ForTestTopAction_Convenience_Async() + public async Task Example_FirstTestTypeSpec_TopAction_ShortVersion_Convenience_Async() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); - Response response = await client.TopActionAsync(DateTimeOffset.Parse("2024-05-06T12:20-12Z")); + Response response = await client.TopActionAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_TopAction_AllParameters() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.TopAction(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_TopAction_AllParameters_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.TopActionAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_TopAction_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.TopAction(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_TopAction_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.TopActionAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_TopAction2_ShortVersion() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.TopAction2(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_TopAction2_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.TopAction2Async(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_TopAction2_AllParameters() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.TopAction2(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_TopAction2_AllParameters_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.TopAction2Async(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_PatchAction_ShortVersion() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + requiredBadDescription = "", + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + }); + Response response = client.PatchAction(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_PatchAction_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + requiredBadDescription = "", + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + }); + Response response = await client.PatchActionAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_PatchAction_AllParameters() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + optionalLiteralString = "reject", + optionalLiteralInt = 456, + optionalLiteralFloat = 4.56F, + optionalLiteralBool = true, + requiredBadDescription = "", + optionalNullableList = new object[] + { +1234 + }, + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + optionalFloatProperty = new object(), + optionalResourceId = "", + }); + Response response = client.PatchAction(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_PatchAction_AllParameters_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + optionalLiteralString = "reject", + optionalLiteralInt = 456, + optionalLiteralFloat = 4.56F, + optionalLiteralBool = true, + requiredBadDescription = "", + optionalNullableList = new object[] + { +1234 + }, + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + optionalFloatProperty = new object(), + optionalResourceId = "", + }); + Response response = await client.PatchActionAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_AnonymousBody_ShortVersion() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + requiredBadDescription = "", + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + }); + Response response = client.AnonymousBody(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_AnonymousBody_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + requiredBadDescription = "", + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + }); + Response response = await client.AnonymousBodyAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_AnonymousBody_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.AnonymousBody("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default, AnonymousBodyRequestRequiredLiteralString.Accept, AnonymousBodyRequestRequiredLiteralInt._123, AnonymousBodyRequestRequiredLiteralFloat._123, false); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_AnonymousBody_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.AnonymousBodyAsync("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default, AnonymousBodyRequestRequiredLiteralString.Accept, AnonymousBodyRequestRequiredLiteralInt._123, AnonymousBodyRequestRequiredLiteralFloat._123, false); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_AnonymousBody_AllParameters() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + optionalLiteralString = "reject", + optionalLiteralInt = 456, + optionalLiteralFloat = 4.56F, + optionalLiteralBool = true, + requiredBadDescription = "", + optionalNullableList = new object[] + { +1234 + }, + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + optionalFloatProperty = new object(), + optionalResourceId = "", + }); + Response response = client.AnonymousBody(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_AnonymousBody_AllParameters_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + optionalLiteralString = "reject", + optionalLiteralInt = 456, + optionalLiteralFloat = 4.56F, + optionalLiteralBool = true, + requiredBadDescription = "", + optionalNullableList = new object[] + { +1234 + }, + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + optionalFloatProperty = new object(), + optionalResourceId = "", + }); + Response response = await client.AnonymousBodyAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_AnonymousBody_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.AnonymousBody("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default, AnonymousBodyRequestRequiredLiteralString.Accept, AnonymousBodyRequestRequiredLiteralInt._123, AnonymousBodyRequestRequiredLiteralFloat._123, false, optionalLiteralString: AnonymousBodyRequestOptionalLiteralString.Reject, optionalLiteralInt: AnonymousBodyRequestOptionalLiteralInt._456, optionalLiteralFloat: AnonymousBodyRequestOptionalLiteralFloat._456, optionalLiteralBool: true, optionalNullableList: new int[] { 1234 }, optionalFloatProperty: (double)default, optionalResourceId: new ResourceIdentifier("")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_AnonymousBody_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.AnonymousBodyAsync("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default, AnonymousBodyRequestRequiredLiteralString.Accept, AnonymousBodyRequestRequiredLiteralInt._123, AnonymousBodyRequestRequiredLiteralFloat._123, false, optionalLiteralString: AnonymousBodyRequestOptionalLiteralString.Reject, optionalLiteralInt: AnonymousBodyRequestOptionalLiteralInt._456, optionalLiteralFloat: AnonymousBodyRequestOptionalLiteralFloat._456, optionalLiteralBool: true, optionalNullableList: new int[] { 1234 }, optionalFloatProperty: (double)default, optionalResourceId: new ResourceIdentifier("")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_FriendlyModel_ShortVersion() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + name = "", + }); + Response response = client.FriendlyModel(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_FriendlyModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + name = "", + }); + Response response = await client.FriendlyModelAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_FriendlyModel_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.FriendlyModel(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_FriendlyModel_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.FriendlyModelAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_FriendlyModel_AllParameters() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + name = "", + }); + Response response = client.FriendlyModel(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_FriendlyModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + name = "", + }); + Response response = await client.FriendlyModelAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_FriendlyModel_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.FriendlyModel(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_FriendlyModel_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.FriendlyModelAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_AddTimeHeader_ShortVersion() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.AddTimeHeader(); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_AddTimeHeader_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.AddTimeHeaderAsync(); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_AddTimeHeader_AllParameters() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.AddTimeHeader(); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_AddTimeHeader_AllParameters_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.AddTimeHeaderAsync(); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_StringFormat_ShortVersion() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + sourceUrl = "http://localhost:3000", + guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + }); + Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_StringFormat_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + sourceUrl = "http://localhost:3000", + guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + }); + Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_StringFormat_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_StringFormat_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_StringFormat_AllParameters() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + sourceUrl = "http://localhost:3000", + guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + }); + Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_StringFormat_AllParameters_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + sourceUrl = "http://localhost:3000", + guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + }); + Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_StringFormat_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + Response response = client.StringFormat(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_StringFormat_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_ProjectedNameModel_ShortVersion() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + name = "", + }); + Response response = client.ProjectedNameModel(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_ProjectedNameModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + name = "", + }); + Response response = await client.ProjectedNameModelAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_ProjectedNameModel_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.ProjectedNameModel(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_ProjectedNameModel_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.ProjectedNameModelAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_ProjectedNameModel_AllParameters() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + name = "", + }); + Response response = client.ProjectedNameModel(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_ProjectedNameModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + name = "", + }); + Response response = await client.ProjectedNameModelAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_ProjectedNameModel_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.ProjectedNameModel(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_ProjectedNameModel_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.ProjectedNameModelAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_ReturnsAnonymousModel_ShortVersion() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.ReturnsAnonymousModel(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_ReturnsAnonymousModel_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.ReturnsAnonymousModelAsync(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_ReturnsAnonymousModel_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.ReturnsAnonymousModel(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_ReturnsAnonymousModel_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.ReturnsAnonymousModelAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_ReturnsAnonymousModel_AllParameters() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.ReturnsAnonymousModel(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_ReturnsAnonymousModel_AllParameters_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.ReturnsAnonymousModelAsync(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_ReturnsAnonymousModel_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.ReturnsAnonymousModel(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_ReturnsAnonymousModel_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.ReturnsAnonymousModelAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_HeadAsBoolean_ShortVersion() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.HeadAsBoolean(""); + + Console.WriteLine(response.GetRawResponse().Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_HeadAsBoolean_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.HeadAsBooleanAsync(""); + + Console.WriteLine(response.GetRawResponse().Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_HeadAsBoolean_AllParameters() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.HeadAsBoolean(""); + + Console.WriteLine(response.GetRawResponse().Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_HeadAsBoolean_AllParameters_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.HeadAsBooleanAsync(""); + + Console.WriteLine(response.GetRawResponse().Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_StringBody_ShortVersion() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(""); + Response response = client.StringBody(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_StringBody_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(""); + Response response = await client.StringBodyAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_StringBody_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.StringBody(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_StringBody_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.StringBodyAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_StringBody_AllParameters() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(""); + Response response = client.StringBody(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_StringBody_AllParameters_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(""); + Response response = await client.StringBodyAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_StringBody_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.StringBody(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_StringBody_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.StringBodyAsync(""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_BoolBody_ShortVersion() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(true); + Response response = client.BoolBody(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_BoolBody_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(true); + Response response = await client.BoolBodyAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_BoolBody_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.BoolBody(true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_BoolBody_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.BoolBodyAsync(true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_BoolBody_AllParameters() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(true); + Response response = client.BoolBody(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_BoolBody_AllParameters_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(true); + Response response = await client.BoolBodyAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_BoolBody_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.BoolBody(true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_BoolBody_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.BoolBodyAsync(true); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_DateTimeBody_ShortVersion() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create("2022-05-10T18:57:31.2311892Z"); + Response response = client.DateTimeBody(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_DateTimeBody_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create("2022-05-10T18:57:31.2311892Z"); + Response response = await client.DateTimeBodyAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_DateTimeBody_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.DateTimeBody(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_DateTimeBody_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.DateTimeBodyAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_DateTimeBody_AllParameters() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create("2022-05-10T18:57:31.2311892Z"); + Response response = client.DateTimeBody(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_DateTimeBody_AllParameters_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create("2022-05-10T18:57:31.2311892Z"); + Response response = await client.DateTimeBodyAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_DateTimeBody_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.DateTimeBody(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_DateTimeBody_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.DateTimeBodyAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_ReturnString_ShortVersion() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.ReturnString(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_ReturnString_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.ReturnStringAsync(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_ReturnString_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.ReturnString(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_ReturnString_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.ReturnStringAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_ReturnString_AllParameters() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.ReturnString(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_ReturnString_AllParameters_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.ReturnStringAsync(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_ReturnString_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.ReturnString(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_ReturnString_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.ReturnStringAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_ReturnUnknown_ShortVersion() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.ReturnUnknown(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_ReturnUnknown_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.ReturnUnknownAsync(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_ReturnUnknown_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.ReturnUnknown(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_ReturnUnknown_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.ReturnUnknownAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_ReturnUnknown_AllParameters() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.ReturnUnknown(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_ReturnUnknown_AllParameters_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.ReturnUnknownAsync(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_ReturnUnknown_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.ReturnUnknown(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_ReturnUnknown_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.ReturnUnknownAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_RecursiveExtension_ShortVersion() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + level = 123, + }); + Response response = client.RecursiveExtension(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_RecursiveExtension_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + level = 123, + }); + Response response = await client.RecursiveExtensionAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_RecursiveExtension_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Extension input = new Extension(123); + Response response = client.RecursiveExtension(input); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_RecursiveExtension_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Extension input = new Extension(123); + Response response = await client.RecursiveExtensionAsync(input); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_RecursiveExtension_AllParameters() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + level = 123, + extension = new object[] + { +null + }, + }); + Response response = client.RecursiveExtension(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_RecursiveExtension_AllParameters_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + level = 123, + extension = new object[] + { +null + }, + }); + Response response = await client.RecursiveExtensionAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_RecursiveExtension_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Extension input = new Extension(123) + { + Extension = { default }, + }; + Response response = client.RecursiveExtension(input); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_RecursiveExtension_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Extension input = new Extension(123) + { + Extension = { default }, + }; + Response response = await client.RecursiveExtensionAsync(input); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_ThreeLevelRecursive_ShortVersion() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.ThreeLevelRecursive(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_ThreeLevelRecursive_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.ThreeLevelRecursiveAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_ThreeLevelRecursive_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Extendible input = new Extendible(); + Response response = client.ThreeLevelRecursive(input); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_ThreeLevelRecursive_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Extendible input = new Extendible(); + Response response = await client.ThreeLevelRecursiveAsync(input); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_ThreeLevelRecursive_AllParameters() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + extension = new object[] + { +new +{ +level = 123, +extension = new object[] +{ +null +}, +} + }, + }); + Response response = client.ThreeLevelRecursive(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_ThreeLevelRecursive_AllParameters_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + extension = new object[] + { +new +{ +level = 123, +extension = new object[] +{ +null +}, +} + }, + }); + Response response = await client.ThreeLevelRecursiveAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_ThreeLevelRecursive_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Extendible input = new Extendible + { + Extension = {new ThereLevelExtension(123) +{ +Extension = {default}, +}}, + }; + Response response = client.ThreeLevelRecursive(input); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_ThreeLevelRecursive_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Extendible input = new Extendible + { + Extension = {new ThereLevelExtension(123) +{ +Extension = {default}, +}}, + }; + Response response = await client.ThreeLevelRecursiveAsync(input); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_RecursiveModels_ShortVersion() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + parent = new object[] + { +new +{ +level = 123, +} + }, + level = 123, + }); + Response response = client.RecursiveModels(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_RecursiveModels_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + parent = new object[] + { +new +{ +level = 123, +} + }, + level = 123, + }); + Response response = await client.RecursiveModelsAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_RecursiveModels_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + ChildModel input = new ChildModel(123, new BaseModel[] + { +new BaseModel(123) + }); + Response response = client.RecursiveModels(input); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_RecursiveModels_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + ChildModel input = new ChildModel(123, new BaseModel[] + { +new BaseModel(123) + }); + Response response = await client.RecursiveModelsAsync(input); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_RecursiveModels_AllParameters() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + parent = new object[] + { +new +{ +level = 123, +} + }, + level = 123, + }); + Response response = client.RecursiveModels(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_RecursiveModels_AllParameters_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + parent = new object[] + { +new +{ +level = 123, +} + }, + level = 123, + }); + Response response = await client.RecursiveModelsAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_RecursiveModels_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + ChildModel input = new ChildModel(123, new BaseModel[] + { +new BaseModel(123) + }); + Response response = client.RecursiveModels(input); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_RecursiveModels_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + ChildModel input = new ChildModel(123, new BaseModel[] + { +new BaseModel(123) + }); + Response response = await client.RecursiveModelsAsync(input); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_ContainSelfModels_ShortVersion() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new { }); + Response response = client.ContainSelfModels(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_ContainSelfModels_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new { }); + Response response = await client.ContainSelfModelsAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_ContainSelfModels_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + ContainSelf input = new ContainSelf(default); + Response response = client.ContainSelfModels(input); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_ContainSelfModels_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + ContainSelf input = new ContainSelf(default); + Response response = await client.ContainSelfModelsAsync(input); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_ContainSelfModels_AllParameters() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new { }); + Response response = client.ContainSelfModels(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_ContainSelfModels_AllParameters_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new { }); + Response response = await client.ContainSelfModelsAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_ContainSelfModels_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + ContainSelf input = new ContainSelf(default); + Response response = client.ContainSelfModels(input); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_ContainSelfModels_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + ContainSelf input = new ContainSelf(default); + Response response = await client.ContainSelfModelsAsync(input); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_EnumParameter_ShortVersion() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.EnumParameter(1.1F); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_EnumParameter_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.EnumParameterAsync(1.1F); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_EnumParameter_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.EnumParameter(CsProjectedEnum.CsOne); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_EnumParameter_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.EnumParameterAsync(CsProjectedEnum.CsOne); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_EnumParameter_AllParameters() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.EnumParameter(1.1F); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_EnumParameter_AllParameters_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.EnumParameterAsync(1.1F); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_EnumParameter_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.EnumParameter(CsProjectedEnum.CsOne); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_EnumParameter_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.EnumParameterAsync(CsProjectedEnum.CsOne); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_BodyIsModelWithProjectedEnum_ShortVersion() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + enumProperty = 1.1F, + }); + Response response = client.BodyIsModelWithProjectedEnum(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_BodyIsModelWithProjectedEnum_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + enumProperty = 1.1F, + }); + Response response = await client.BodyIsModelWithProjectedEnumAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_BodyIsModelWithProjectedEnum_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + ModelWithProjectedEnum body = new ModelWithProjectedEnum(CsProjectedEnumInModel.CsOne); + Response response = client.BodyIsModelWithProjectedEnum(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_BodyIsModelWithProjectedEnum_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + ModelWithProjectedEnum body = new ModelWithProjectedEnum(CsProjectedEnumInModel.CsOne); + Response response = await client.BodyIsModelWithProjectedEnumAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_BodyIsModelWithProjectedEnum_AllParameters() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + enumProperty = 1.1F, + }); + Response response = client.BodyIsModelWithProjectedEnum(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_BodyIsModelWithProjectedEnum_AllParameters_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + enumProperty = 1.1F, + }); + Response response = await client.BodyIsModelWithProjectedEnumAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_BodyIsModelWithProjectedEnum_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + ModelWithProjectedEnum body = new ModelWithProjectedEnum(CsProjectedEnumInModel.CsOne); + Response response = client.BodyIsModelWithProjectedEnum(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_BodyIsModelWithProjectedEnum_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + ModelWithProjectedEnum body = new ModelWithProjectedEnum(CsProjectedEnumInModel.CsOne); + Response response = await client.BodyIsModelWithProjectedEnumAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_OptionalDictionary_ShortVersion() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = null; + Response response = client.OptionalDictionary(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_OptionalDictionary_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = null; + Response response = await client.OptionalDictionaryAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_OptionalDictionary_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.OptionalDictionary(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_OptionalDictionary_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.OptionalDictionaryAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_OptionalDictionary_AllParameters() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + key = 1234, + }); + Response response = client.OptionalDictionary(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_OptionalDictionary_AllParameters_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + key = 1234, + }); + Response response = await client.OptionalDictionaryAsync(content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_OptionalDictionary_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.OptionalDictionary(body: new Dictionary + { + ["key"] = 1234 + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_OptionalDictionary_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.OptionalDictionaryAsync(body: new Dictionary + { + ["key"] = 1234 + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_AzureLocationOp_ShortVersion() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = null; + Response response = client.AzureLocationOp(new AzureLocation(""), new AzureLocation(""), content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_AzureLocationOp_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = null; + Response response = await client.AzureLocationOpAsync(new AzureLocation(""), new AzureLocation(""), content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_AzureLocationOp_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = client.AzureLocationOp(new AzureLocation(""), new AzureLocation("")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_AzureLocationOp_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + Response response = await client.AzureLocationOpAsync(new AzureLocation(""), new AzureLocation("")); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_AzureLocationOp_AllParameters() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + location = "", + }); + Response response = client.AzureLocationOp(new AzureLocation(""), new AzureLocation(""), content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_AzureLocationOp_AllParameters_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + using RequestContent content = RequestContent.Create(new + { + location = "", + }); + Response response = await client.AzureLocationOpAsync(new AzureLocation(""), new AzureLocation(""), content); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_FirstTestTypeSpec_AzureLocationOp_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + AzureLocationModel body = new AzureLocationModel(new AzureLocation("")); + Response response = client.AzureLocationOp(new AzureLocation(""), new AzureLocation(""), body: body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_FirstTestTypeSpec_AzureLocationOp_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + FirstTestTypeSpecClient client = new FirstTestTypeSpecClient(endpoint); + + AzureLocationModel body = new AzureLocationModel(new AzureLocation("")); + Response response = await client.AzureLocationOpAsync(new AzureLocation(""), new AzureLocation(""), body: body); } } } diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_Glossary.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_Glossary.cs new file mode 100644 index 00000000000..0a7fc9c402a --- /dev/null +++ b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_Glossary.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure; +using Azure.Identity; +using FirstTestTypeSpec.Models; +using NUnit.Framework; + +namespace FirstTestTypeSpec.Samples +{ + public partial class Samples_Glossary + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_DoSomething_ShortVersion() + { + Uri endpoint = new Uri(""); + Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); + + Response response = client.DoSomething("", "

", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_DoSomething_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); + + Response response = await client.DoSomethingAsync("", "

", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_DoSomething_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); + + Response response = client.DoSomething("", "

"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_DoSomething_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); + + Response response = await client.DoSomethingAsync("", "

"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_DoSomething_AllParameters() + { + Uri endpoint = new Uri(""); + Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); + + Response response = client.DoSomething("", "

", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_DoSomething_AllParameters_Async() + { + Uri endpoint = new Uri(""); + Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); + + Response response = await client.DoSomethingAsync("", "

", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Glossary_DoSomething_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); + + Response response = client.DoSomething("", "

"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Glossary_DoSomething_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + Glossary client = new FirstTestTypeSpecClient(endpoint).GetGlossaryClient(); + + Response response = await client.DoSomethingAsync("", "

"); + } + } +} diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_HelloDemo.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_HelloDemo.cs new file mode 100644 index 00000000000..4c79c5a8e76 --- /dev/null +++ b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_HelloDemo.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure; +using Azure.Identity; +using NUnit.Framework; + +namespace FirstTestTypeSpec.Samples +{ + public partial class Samples_HelloDemo + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Demo_SayHi_ShortVersion() + { + Uri endpoint = new Uri(""); + HelloDemo client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemoClient(); + + Response response = client.SayHi("", "", null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Demo_SayHi_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + HelloDemo client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemoClient(); + + Response response = await client.SayHiAsync("", "", null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Demo_SayHi_AllParameters() + { + Uri endpoint = new Uri(""); + HelloDemo client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemoClient(); + + Response response = client.SayHi("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Demo_SayHi_AllParameters_Async() + { + Uri endpoint = new Uri(""); + HelloDemo client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemoClient(); + + Response response = await client.SayHiAsync("", "", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); + } + } +} diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_HelloDemo2.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_HelloDemo2.cs new file mode 100644 index 00000000000..12548ed58fb --- /dev/null +++ b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Samples/Samples_HelloDemo2.cs @@ -0,0 +1,1524 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using FirstTestTypeSpec.Models; +using NUnit.Framework; + +namespace FirstTestTypeSpec.Samples +{ + public partial class Samples_HelloDemo2 + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Demo2_HelloAgain_ShortVersion() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + using RequestContent content = RequestContent.Create(new + { + requiredString = "", + requiredInt = 1234, + requiredCollection = new object[] + { +"1" + }, + requiredDictionary = new + { + key = "1", + }, + requiredModel = new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + requiredBadDescription = "", + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + }, + requiredUnknown = new object(), + requiredRecordUnknown = new + { + key = new object(), + }, + modelWithRequiredNullable = new + { + requiredNullablePrimitive = 1234, + requiredExtensibleEnum = "1", + requiredFixedEnum = "1", + }, + unionList = new object[] + { +"" + }, + }); + Response response = client.HelloAgain("", "", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("requiredString").ToString()); + Console.WriteLine(result.GetProperty("requiredInt").ToString()); + Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); + Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); + Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); + Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); + Console.WriteLine(result.GetProperty("unionList")[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Demo2_HelloAgain_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + using RequestContent content = RequestContent.Create(new + { + requiredString = "", + requiredInt = 1234, + requiredCollection = new object[] + { +"1" + }, + requiredDictionary = new + { + key = "1", + }, + requiredModel = new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + requiredBadDescription = "", + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + }, + requiredUnknown = new object(), + requiredRecordUnknown = new + { + key = new object(), + }, + modelWithRequiredNullable = new + { + requiredNullablePrimitive = 1234, + requiredExtensibleEnum = "1", + requiredFixedEnum = "1", + }, + unionList = new object[] + { +"" + }, + }); + Response response = await client.HelloAgainAsync("", "", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("requiredString").ToString()); + Console.WriteLine(result.GetProperty("requiredInt").ToString()); + Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); + Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); + Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); + Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); + Console.WriteLine(result.GetProperty("unionList")[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Demo2_HelloAgain_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + RoundTripModel action = new RoundTripModel( + "", + 1234, + new StringFixedEnum[] { StringFixedEnum.One }, + new Dictionary + { + ["key"] = StringExtensibleEnum.One + }, + new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default), + BinaryData.FromObjectAsJson(new object()), + new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + new ModelWithRequiredNullableProperties(1234, StringExtensibleEnum.One, StringFixedEnum.One), + new BinaryData[] + { +BinaryData.FromObjectAsJson("") + }); + Response response = client.HelloAgain("", "", action); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Demo2_HelloAgain_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + RoundTripModel action = new RoundTripModel( + "", + 1234, + new StringFixedEnum[] { StringFixedEnum.One }, + new Dictionary + { + ["key"] = StringExtensibleEnum.One + }, + new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default), + BinaryData.FromObjectAsJson(new object()), + new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + new ModelWithRequiredNullableProperties(1234, StringExtensibleEnum.One, StringFixedEnum.One), + new BinaryData[] + { +BinaryData.FromObjectAsJson("") + }); + Response response = await client.HelloAgainAsync("", "", action); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Demo2_HelloAgain_AllParameters() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + using RequestContent content = RequestContent.Create(new + { + requiredString = "", + requiredInt = 1234, + requiredCollection = new object[] + { +"1" + }, + requiredDictionary = new + { + key = "1", + }, + requiredModel = new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + optionalLiteralString = "reject", + optionalLiteralInt = 456, + optionalLiteralFloat = 4.56F, + optionalLiteralBool = true, + requiredBadDescription = "", + optionalNullableList = new object[] + { +1234 + }, + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + optionalFloatProperty = new object(), + optionalResourceId = "", + }, + intExtensibleEnum = 1, + intExtensibleEnumCollection = new object[] + { +1 + }, + floatExtensibleEnum = 1F, + floatExtensibleEnumCollection = new object[] + { +1F + }, + floatFixedEnum = 1.1F, + floatFixedEnumCollection = new object[] + { +1.1F + }, + intFixedEnum = 1, + intFixedEnumCollection = new object[] + { +1 + }, + stringFixedEnum = "1", + requiredUnknown = new object(), + optionalUnknown = new object(), + requiredRecordUnknown = new + { + key = new object(), + }, + optionalRecordUnknown = new + { + key = new object(), + }, + modelWithRequiredNullable = new + { + requiredNullablePrimitive = 1234, + requiredExtensibleEnum = "1", + requiredFixedEnum = "1", + }, + unionList = new object[] + { +"" + }, + }); + Response response = client.HelloAgain("", "", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("requiredString").ToString()); + Console.WriteLine(result.GetProperty("requiredInt").ToString()); + Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalResourceId").ToString()); + Console.WriteLine(result.GetProperty("intExtensibleEnum").ToString()); + Console.WriteLine(result.GetProperty("intExtensibleEnumCollection")[0].ToString()); + Console.WriteLine(result.GetProperty("floatExtensibleEnum").ToString()); + Console.WriteLine(result.GetProperty("floatExtensibleEnumCollection")[0].ToString()); + Console.WriteLine(result.GetProperty("floatFixedEnum").ToString()); + Console.WriteLine(result.GetProperty("floatFixedEnumCollection")[0].ToString()); + Console.WriteLine(result.GetProperty("intFixedEnum").ToString()); + Console.WriteLine(result.GetProperty("intFixedEnumCollection")[0].ToString()); + Console.WriteLine(result.GetProperty("stringFixedEnum").ToString()); + Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); + Console.WriteLine(result.GetProperty("optionalUnknown").ToString()); + Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("optionalRecordUnknown").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("readOnlyOptionalRecordUnknown").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); + Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); + Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); + Console.WriteLine(result.GetProperty("unionList")[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Demo2_HelloAgain_AllParameters_Async() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + using RequestContent content = RequestContent.Create(new + { + requiredString = "", + requiredInt = 1234, + requiredCollection = new object[] + { +"1" + }, + requiredDictionary = new + { + key = "1", + }, + requiredModel = new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + optionalLiteralString = "reject", + optionalLiteralInt = 456, + optionalLiteralFloat = 4.56F, + optionalLiteralBool = true, + requiredBadDescription = "", + optionalNullableList = new object[] + { +1234 + }, + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + optionalFloatProperty = new object(), + optionalResourceId = "", + }, + intExtensibleEnum = 1, + intExtensibleEnumCollection = new object[] + { +1 + }, + floatExtensibleEnum = 1F, + floatExtensibleEnumCollection = new object[] + { +1F + }, + floatFixedEnum = 1.1F, + floatFixedEnumCollection = new object[] + { +1.1F + }, + intFixedEnum = 1, + intFixedEnumCollection = new object[] + { +1 + }, + stringFixedEnum = "1", + requiredUnknown = new object(), + optionalUnknown = new object(), + requiredRecordUnknown = new + { + key = new object(), + }, + optionalRecordUnknown = new + { + key = new object(), + }, + modelWithRequiredNullable = new + { + requiredNullablePrimitive = 1234, + requiredExtensibleEnum = "1", + requiredFixedEnum = "1", + }, + unionList = new object[] + { +"" + }, + }); + Response response = await client.HelloAgainAsync("", "", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("requiredString").ToString()); + Console.WriteLine(result.GetProperty("requiredInt").ToString()); + Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalResourceId").ToString()); + Console.WriteLine(result.GetProperty("intExtensibleEnum").ToString()); + Console.WriteLine(result.GetProperty("intExtensibleEnumCollection")[0].ToString()); + Console.WriteLine(result.GetProperty("floatExtensibleEnum").ToString()); + Console.WriteLine(result.GetProperty("floatExtensibleEnumCollection")[0].ToString()); + Console.WriteLine(result.GetProperty("floatFixedEnum").ToString()); + Console.WriteLine(result.GetProperty("floatFixedEnumCollection")[0].ToString()); + Console.WriteLine(result.GetProperty("intFixedEnum").ToString()); + Console.WriteLine(result.GetProperty("intFixedEnumCollection")[0].ToString()); + Console.WriteLine(result.GetProperty("stringFixedEnum").ToString()); + Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); + Console.WriteLine(result.GetProperty("optionalUnknown").ToString()); + Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("optionalRecordUnknown").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("readOnlyOptionalRecordUnknown").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); + Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); + Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); + Console.WriteLine(result.GetProperty("unionList")[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Demo2_HelloAgain_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + RoundTripModel action = new RoundTripModel( + "", + 1234, + new StringFixedEnum[] { StringFixedEnum.One }, + new Dictionary + { + ["key"] = StringExtensibleEnum.One + }, + new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default) + { + OptionalLiteralString = ThingOptionalLiteralString.Reject, + OptionalLiteralInt = ThingOptionalLiteralInt._456, + OptionalLiteralFloat = ThingOptionalLiteralFloat._456, + OptionalLiteralBool = true, + OptionalNullableList = { 1234 }, + OptionalFloatProperty = (double)default, + OptionalResourceId = new ResourceIdentifier(""), + }, + BinaryData.FromObjectAsJson(new object()), + new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + new ModelWithRequiredNullableProperties(1234, StringExtensibleEnum.One, StringFixedEnum.One), + new BinaryData[] + { +BinaryData.FromObjectAsJson("") + }) + { + IntExtensibleEnum = IntExtensibleEnum.One, + IntExtensibleEnumCollection = { IntExtensibleEnum.One }, + FloatExtensibleEnum = FloatExtensibleEnum.One, + FloatExtensibleEnumCollection = { FloatExtensibleEnum.One }, + FloatFixedEnum = FloatFixedEnum.One, + FloatFixedEnumCollection = { FloatFixedEnum.One }, + IntFixedEnum = IntFixedEnum.One, + IntFixedEnumCollection = { IntFixedEnum.One }, + StringFixedEnum = StringFixedEnum.One, + OptionalUnknown = BinaryData.FromObjectAsJson(new object()), + OptionalRecordUnknown = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, + }; + Response response = client.HelloAgain("", "", action); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Demo2_HelloAgain_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + RoundTripModel action = new RoundTripModel( + "", + 1234, + new StringFixedEnum[] { StringFixedEnum.One }, + new Dictionary + { + ["key"] = StringExtensibleEnum.One + }, + new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default) + { + OptionalLiteralString = ThingOptionalLiteralString.Reject, + OptionalLiteralInt = ThingOptionalLiteralInt._456, + OptionalLiteralFloat = ThingOptionalLiteralFloat._456, + OptionalLiteralBool = true, + OptionalNullableList = { 1234 }, + OptionalFloatProperty = (double)default, + OptionalResourceId = new ResourceIdentifier(""), + }, + BinaryData.FromObjectAsJson(new object()), + new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + new ModelWithRequiredNullableProperties(1234, StringExtensibleEnum.One, StringFixedEnum.One), + new BinaryData[] + { +BinaryData.FromObjectAsJson("") + }) + { + IntExtensibleEnum = IntExtensibleEnum.One, + IntExtensibleEnumCollection = { IntExtensibleEnum.One }, + FloatExtensibleEnum = FloatExtensibleEnum.One, + FloatExtensibleEnumCollection = { FloatExtensibleEnum.One }, + FloatFixedEnum = FloatFixedEnum.One, + FloatFixedEnumCollection = { FloatFixedEnum.One }, + IntFixedEnum = IntFixedEnum.One, + IntFixedEnumCollection = { IntFixedEnum.One }, + StringFixedEnum = StringFixedEnum.One, + OptionalUnknown = BinaryData.FromObjectAsJson(new object()), + OptionalRecordUnknown = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, + }; + Response response = await client.HelloAgainAsync("", "", action); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Demo2_NoContentType_ShortVersion() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + using RequestContent content = RequestContent.Create(new + { + requiredString = "", + requiredInt = 1234, + requiredCollection = new object[] + { +"1" + }, + requiredDictionary = new + { + key = "1", + }, + requiredModel = new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + requiredBadDescription = "", + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + }, + requiredUnknown = new object(), + requiredRecordUnknown = new + { + key = new object(), + }, + modelWithRequiredNullable = new + { + requiredNullablePrimitive = 1234, + requiredExtensibleEnum = "1", + requiredFixedEnum = "1", + }, + unionList = new object[] + { +"" + }, + }); + Response response = client.NoContentType("", "", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("requiredString").ToString()); + Console.WriteLine(result.GetProperty("requiredInt").ToString()); + Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); + Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); + Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); + Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); + Console.WriteLine(result.GetProperty("unionList")[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Demo2_NoContentType_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + using RequestContent content = RequestContent.Create(new + { + requiredString = "", + requiredInt = 1234, + requiredCollection = new object[] + { +"1" + }, + requiredDictionary = new + { + key = "1", + }, + requiredModel = new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + requiredBadDescription = "", + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + }, + requiredUnknown = new object(), + requiredRecordUnknown = new + { + key = new object(), + }, + modelWithRequiredNullable = new + { + requiredNullablePrimitive = 1234, + requiredExtensibleEnum = "1", + requiredFixedEnum = "1", + }, + unionList = new object[] + { +"" + }, + }); + Response response = await client.NoContentTypeAsync("", "", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("requiredString").ToString()); + Console.WriteLine(result.GetProperty("requiredInt").ToString()); + Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); + Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); + Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); + Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); + Console.WriteLine(result.GetProperty("unionList")[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Demo2_NoContentType_AllParameters() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + using RequestContent content = RequestContent.Create(new + { + requiredString = "", + requiredInt = 1234, + requiredCollection = new object[] + { +"1" + }, + requiredDictionary = new + { + key = "1", + }, + requiredModel = new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + optionalLiteralString = "reject", + optionalLiteralInt = 456, + optionalLiteralFloat = 4.56F, + optionalLiteralBool = true, + requiredBadDescription = "", + optionalNullableList = new object[] + { +1234 + }, + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + optionalFloatProperty = new object(), + optionalResourceId = "", + }, + intExtensibleEnum = 1, + intExtensibleEnumCollection = new object[] + { +1 + }, + floatExtensibleEnum = 1F, + floatExtensibleEnumCollection = new object[] + { +1F + }, + floatFixedEnum = 1.1F, + floatFixedEnumCollection = new object[] + { +1.1F + }, + intFixedEnum = 1, + intFixedEnumCollection = new object[] + { +1 + }, + stringFixedEnum = "1", + requiredUnknown = new object(), + optionalUnknown = new object(), + requiredRecordUnknown = new + { + key = new object(), + }, + optionalRecordUnknown = new + { + key = new object(), + }, + modelWithRequiredNullable = new + { + requiredNullablePrimitive = 1234, + requiredExtensibleEnum = "1", + requiredFixedEnum = "1", + }, + unionList = new object[] + { +"" + }, + }); + Response response = client.NoContentType("", "", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("requiredString").ToString()); + Console.WriteLine(result.GetProperty("requiredInt").ToString()); + Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalResourceId").ToString()); + Console.WriteLine(result.GetProperty("intExtensibleEnum").ToString()); + Console.WriteLine(result.GetProperty("intExtensibleEnumCollection")[0].ToString()); + Console.WriteLine(result.GetProperty("floatExtensibleEnum").ToString()); + Console.WriteLine(result.GetProperty("floatExtensibleEnumCollection")[0].ToString()); + Console.WriteLine(result.GetProperty("floatFixedEnum").ToString()); + Console.WriteLine(result.GetProperty("floatFixedEnumCollection")[0].ToString()); + Console.WriteLine(result.GetProperty("intFixedEnum").ToString()); + Console.WriteLine(result.GetProperty("intFixedEnumCollection")[0].ToString()); + Console.WriteLine(result.GetProperty("stringFixedEnum").ToString()); + Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); + Console.WriteLine(result.GetProperty("optionalUnknown").ToString()); + Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("optionalRecordUnknown").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("readOnlyOptionalRecordUnknown").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); + Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); + Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); + Console.WriteLine(result.GetProperty("unionList")[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Demo2_NoContentType_AllParameters_Async() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + using RequestContent content = RequestContent.Create(new + { + requiredString = "", + requiredInt = 1234, + requiredCollection = new object[] + { +"1" + }, + requiredDictionary = new + { + key = "1", + }, + requiredModel = new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + optionalLiteralString = "reject", + optionalLiteralInt = 456, + optionalLiteralFloat = 4.56F, + optionalLiteralBool = true, + requiredBadDescription = "", + optionalNullableList = new object[] + { +1234 + }, + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + optionalFloatProperty = new object(), + optionalResourceId = "", + }, + intExtensibleEnum = 1, + intExtensibleEnumCollection = new object[] + { +1 + }, + floatExtensibleEnum = 1F, + floatExtensibleEnumCollection = new object[] + { +1F + }, + floatFixedEnum = 1.1F, + floatFixedEnumCollection = new object[] + { +1.1F + }, + intFixedEnum = 1, + intFixedEnumCollection = new object[] + { +1 + }, + stringFixedEnum = "1", + requiredUnknown = new object(), + optionalUnknown = new object(), + requiredRecordUnknown = new + { + key = new object(), + }, + optionalRecordUnknown = new + { + key = new object(), + }, + modelWithRequiredNullable = new + { + requiredNullablePrimitive = 1234, + requiredExtensibleEnum = "1", + requiredFixedEnum = "1", + }, + unionList = new object[] + { +"" + }, + }); + Response response = await client.NoContentTypeAsync("", "", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("requiredString").ToString()); + Console.WriteLine(result.GetProperty("requiredInt").ToString()); + Console.WriteLine(result.GetProperty("requiredCollection")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredDictionary").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("requiredFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("requiredModel").GetProperty("optionalResourceId").ToString()); + Console.WriteLine(result.GetProperty("intExtensibleEnum").ToString()); + Console.WriteLine(result.GetProperty("intExtensibleEnumCollection")[0].ToString()); + Console.WriteLine(result.GetProperty("floatExtensibleEnum").ToString()); + Console.WriteLine(result.GetProperty("floatExtensibleEnumCollection")[0].ToString()); + Console.WriteLine(result.GetProperty("floatFixedEnum").ToString()); + Console.WriteLine(result.GetProperty("floatFixedEnumCollection")[0].ToString()); + Console.WriteLine(result.GetProperty("intFixedEnum").ToString()); + Console.WriteLine(result.GetProperty("intFixedEnumCollection")[0].ToString()); + Console.WriteLine(result.GetProperty("stringFixedEnum").ToString()); + Console.WriteLine(result.GetProperty("requiredUnknown").ToString()); + Console.WriteLine(result.GetProperty("optionalUnknown").ToString()); + Console.WriteLine(result.GetProperty("requiredRecordUnknown").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("optionalRecordUnknown").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("readOnlyRequiredRecordUnknown").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("readOnlyOptionalRecordUnknown").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredNullablePrimitive").ToString()); + Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredExtensibleEnum").ToString()); + Console.WriteLine(result.GetProperty("modelWithRequiredNullable").GetProperty("requiredFixedEnum").ToString()); + Console.WriteLine(result.GetProperty("unionList")[0].ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Demo2_HelloDemoAgain_ShortVersion() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + Response response = client.HelloDemoAgain(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Demo2_HelloDemoAgain_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + Response response = await client.HelloDemoAgainAsync(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Demo2_HelloDemoAgain_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + Response response = client.HelloDemoAgain(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Demo2_HelloDemoAgain_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + Response response = await client.HelloDemoAgainAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Demo2_HelloDemoAgain_AllParameters() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + Response response = client.HelloDemoAgain(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Demo2_HelloDemoAgain_AllParameters_Async() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + Response response = await client.HelloDemoAgainAsync(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Demo2_HelloDemoAgain_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + Response response = client.HelloDemoAgain(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Demo2_HelloDemoAgain_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + Response response = await client.HelloDemoAgainAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Demo2_CreateLiteral_ShortVersion() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + using RequestContent content = RequestContent.Create(new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + requiredBadDescription = "", + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + }); + Response response = client.CreateLiteral(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Demo2_CreateLiteral_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + using RequestContent content = RequestContent.Create(new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + requiredBadDescription = "", + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + }); + Response response = await client.CreateLiteralAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Demo2_CreateLiteral_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + Thing body = new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default); + Response response = client.CreateLiteral(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Demo2_CreateLiteral_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + Thing body = new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default); + Response response = await client.CreateLiteralAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Demo2_CreateLiteral_AllParameters() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + using RequestContent content = RequestContent.Create(new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + optionalLiteralString = "reject", + optionalLiteralInt = 456, + optionalLiteralFloat = 4.56F, + optionalLiteralBool = true, + requiredBadDescription = "", + optionalNullableList = new object[] + { +1234 + }, + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + optionalFloatProperty = new object(), + optionalResourceId = "", + }); + Response response = client.CreateLiteral(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Demo2_CreateLiteral_AllParameters_Async() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + using RequestContent content = RequestContent.Create(new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + optionalLiteralString = "reject", + optionalLiteralInt = 456, + optionalLiteralFloat = 4.56F, + optionalLiteralBool = true, + requiredBadDescription = "", + optionalNullableList = new object[] + { +1234 + }, + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + optionalFloatProperty = new object(), + optionalResourceId = "", + }); + Response response = await client.CreateLiteralAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Demo2_CreateLiteral_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + Thing body = new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default) + { + OptionalLiteralString = ThingOptionalLiteralString.Reject, + OptionalLiteralInt = ThingOptionalLiteralInt._456, + OptionalLiteralFloat = ThingOptionalLiteralFloat._456, + OptionalLiteralBool = true, + OptionalNullableList = { 1234 }, + OptionalFloatProperty = (double)default, + OptionalResourceId = new ResourceIdentifier(""), + }; + Response response = client.CreateLiteral(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Demo2_CreateLiteral_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + Thing body = new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default) + { + OptionalLiteralString = ThingOptionalLiteralString.Reject, + OptionalLiteralInt = ThingOptionalLiteralInt._456, + OptionalLiteralFloat = ThingOptionalLiteralFloat._456, + OptionalLiteralBool = true, + OptionalNullableList = { 1234 }, + OptionalFloatProperty = (double)default, + OptionalResourceId = new ResourceIdentifier(""), + }; + Response response = await client.CreateLiteralAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Demo2_HelloLiteral_ShortVersion() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + Response response = client.HelloLiteral(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Demo2_HelloLiteral_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + Response response = await client.HelloLiteralAsync(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Demo2_HelloLiteral_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + Response response = client.HelloLiteral(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Demo2_HelloLiteral_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + Response response = await client.HelloLiteralAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Demo2_HelloLiteral_AllParameters() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + Response response = client.HelloLiteral(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Demo2_HelloLiteral_AllParameters_Async() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + Response response = await client.HelloLiteralAsync(null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("requiredUnion").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralString").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("requiredLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralString").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralInt").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralFloat").ToString()); + Console.WriteLine(result.GetProperty("optionalLiteralBool").ToString()); + Console.WriteLine(result.GetProperty("requiredBadDescription").ToString()); + Console.WriteLine(result.GetProperty("optionalNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredNullableList")[0].ToString()); + Console.WriteLine(result.GetProperty("requiredFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalFloatProperty").ToString()); + Console.WriteLine(result.GetProperty("optionalResourceId").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Demo2_HelloLiteral_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + Response response = client.HelloLiteral(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Demo2_HelloLiteral_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + HelloDemo2 client = new FirstTestTypeSpecClient(endpoint).GetHelloClient().GetHelloDemo2Client(); + + Response response = await client.HelloLiteralAsync(); + } + } +} diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/EntityTests.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/EntityTests.cs new file mode 100644 index 00000000000..c7b1a5d25b3 --- /dev/null +++ b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/EntityTests.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Identity; +using FirstTestTypeSpec.Models; +using NUnit.Framework; + +namespace FirstTestTypeSpec.Tests +{ + public partial class EntityTests : FirstTestTypeSpecTestBase + { + public EntityTests(bool isAsync) : base(isAsync) + { + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task Entity_DoSomething_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + Entity client = CreateFirstTestTypeSpecClient(endpoint, credential).GetEntityClient(); + + Response response = await client.DoSomethingAsync("", null); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task Entity_DoSomething_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + Entity client = CreateFirstTestTypeSpecClient(endpoint, credential).GetEntityClient(); + + Response response = await client.DoSomethingAsync(""); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task Entity_DoSomething_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + Entity client = CreateFirstTestTypeSpecClient(endpoint, credential).GetEntityClient(); + + Response response = await client.DoSomethingAsync("", null); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task Entity_DoSomething_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + Entity client = CreateFirstTestTypeSpecClient(endpoint, credential).GetEntityClient(); + + Response response = await client.DoSomethingAsync(""); + } + } +} diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/EnumTestTests.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/EnumTestTests.cs new file mode 100644 index 00000000000..cf16932ec5a --- /dev/null +++ b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/EnumTestTests.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace FirstTestTypeSpec.Tests +{ + public partial class EnumTestTests : FirstTestTypeSpecTestBase + { + public EnumTestTests(bool isAsync) : base(isAsync) + { + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task EnumTest_CreateUnknownValue_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + EnumTest client = CreateFirstTestTypeSpecClient(endpoint, credential).GetEnumTestClient(); + + using RequestContent content = RequestContent.Create("Monday"); + Response response = await client.CreateUnknownValueAsync(content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task EnumTest_CreateUnknownValue_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + EnumTest client = CreateFirstTestTypeSpecClient(endpoint, credential).GetEnumTestClient(); + + using RequestContent content = RequestContent.Create("Monday"); + Response response = await client.CreateUnknownValueAsync(content); + } + } +} diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/FirstTestTypeSpecClientTests.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/FirstTestTypeSpecClientTests.cs index 6db2faea894..0117c72bfa1 100644 --- a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/FirstTestTypeSpecClientTests.cs +++ b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/FirstTestTypeSpecClientTests.cs @@ -6,8 +6,10 @@ #nullable disable using System; +using System.Collections.Generic; using System.Threading.Tasks; using Azure; +using Azure.Core; using Azure.Identity; using FirstTestTypeSpec.Models; using NUnit.Framework; @@ -22,24 +24,1138 @@ public FirstTestTypeSpecClientTests(bool isAsync) : base(isAsync) [Test] [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_TopAction_ForTestTopAction() + public async Task FirstTestTypeSpec_TopAction_ShortVersion() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = null; FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - Response response = await client.TopActionAsync(DateTimeOffset.Parse("2024-05-06T12:20-12Z"), null); + Response response = await client.TopActionAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); } [Test] [Ignore("Please remove the Ignore attribute to let the test method run")] - public async Task FirstTestTypeSpec_TopAction_ForTestTopAction_Convenience() + public async Task FirstTestTypeSpec_TopAction_ShortVersion_Convenience() { - Uri endpoint = new Uri(""); + Uri endpoint = new Uri(""); AzureKeyCredential credential = null; FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); - Response response = await client.TopActionAsync(DateTimeOffset.Parse("2024-05-06T12:20-12Z")); + Response response = await client.TopActionAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_TopAction_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.TopActionAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z"), null); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_TopAction_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.TopActionAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_TopAction2_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.TopAction2Async(null); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_TopAction2_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.TopAction2Async(null); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_PatchAction_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + requiredBadDescription = "", + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + }); + Response response = await client.PatchActionAsync(content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_PatchAction_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + optionalLiteralString = "reject", + optionalLiteralInt = 456, + optionalLiteralFloat = 4.56F, + optionalLiteralBool = true, + requiredBadDescription = "", + optionalNullableList = new object[] + { +1234 + }, + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + optionalFloatProperty = new object(), + optionalResourceId = "", + }); + Response response = await client.PatchActionAsync(content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_AnonymousBody_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + requiredBadDescription = "", + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + }); + Response response = await client.AnonymousBodyAsync(content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_AnonymousBody_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.AnonymousBodyAsync("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default, AnonymousBodyRequestRequiredLiteralString.Accept, AnonymousBodyRequestRequiredLiteralInt._123, AnonymousBodyRequestRequiredLiteralFloat._123, false); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_AnonymousBody_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + optionalLiteralString = "reject", + optionalLiteralInt = 456, + optionalLiteralFloat = 4.56F, + optionalLiteralBool = true, + requiredBadDescription = "", + optionalNullableList = new object[] + { +1234 + }, + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + optionalFloatProperty = new object(), + optionalResourceId = "", + }); + Response response = await client.AnonymousBodyAsync(content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_AnonymousBody_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.AnonymousBodyAsync("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default, AnonymousBodyRequestRequiredLiteralString.Accept, AnonymousBodyRequestRequiredLiteralInt._123, AnonymousBodyRequestRequiredLiteralFloat._123, false, optionalLiteralString: AnonymousBodyRequestOptionalLiteralString.Reject, optionalLiteralInt: AnonymousBodyRequestOptionalLiteralInt._456, optionalLiteralFloat: AnonymousBodyRequestOptionalLiteralFloat._456, optionalLiteralBool: true, optionalNullableList: new int[] { 1234 }, optionalFloatProperty: (double)default, optionalResourceId: new ResourceIdentifier("")); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_FriendlyModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + name = "", + }); + Response response = await client.FriendlyModelAsync(content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_FriendlyModel_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.FriendlyModelAsync(""); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_FriendlyModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + name = "", + }); + Response response = await client.FriendlyModelAsync(content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_FriendlyModel_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.FriendlyModelAsync(""); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_AddTimeHeader_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.AddTimeHeaderAsync(); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_AddTimeHeader_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.AddTimeHeaderAsync(); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_StringFormat_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + sourceUrl = "http://localhost:3000", + guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + }); + Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_StringFormat_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_StringFormat_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + sourceUrl = "http://localhost:3000", + guid = "73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a", + }); + Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_StringFormat_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + ModelWithFormat body = new ModelWithFormat(new Uri("http://localhost:3000"), Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a")); + Response response = await client.StringFormatAsync(Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), body); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_ProjectedNameModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + name = "", + }); + Response response = await client.ProjectedNameModelAsync(content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_ProjectedNameModel_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.ProjectedNameModelAsync(""); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_ProjectedNameModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + name = "", + }); + Response response = await client.ProjectedNameModelAsync(content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_ProjectedNameModel_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.ProjectedNameModelAsync(""); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_ReturnsAnonymousModel_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.ReturnsAnonymousModelAsync(null); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_ReturnsAnonymousModel_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.ReturnsAnonymousModelAsync(); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_ReturnsAnonymousModel_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.ReturnsAnonymousModelAsync(null); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_ReturnsAnonymousModel_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.ReturnsAnonymousModelAsync(); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_HeadAsBoolean_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.HeadAsBooleanAsync(""); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_HeadAsBoolean_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.HeadAsBooleanAsync(""); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_StringBody_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(""); + Response response = await client.StringBodyAsync(content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_StringBody_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.StringBodyAsync(""); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_StringBody_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(""); + Response response = await client.StringBodyAsync(content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_StringBody_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.StringBodyAsync(""); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_BoolBody_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(true); + Response response = await client.BoolBodyAsync(content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_BoolBody_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.BoolBodyAsync(true); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_BoolBody_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(true); + Response response = await client.BoolBodyAsync(content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_BoolBody_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.BoolBodyAsync(true); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_DateTimeBody_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = RequestContent.Create("2022-05-10T18:57:31.2311892Z"); + Response response = await client.DateTimeBodyAsync(content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_DateTimeBody_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.DateTimeBodyAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_DateTimeBody_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = RequestContent.Create("2022-05-10T18:57:31.2311892Z"); + Response response = await client.DateTimeBodyAsync(content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_DateTimeBody_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.DateTimeBodyAsync(DateTimeOffset.Parse("2022-05-10T18:57:31.2311892Z")); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_ReturnString_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.ReturnStringAsync(null); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_ReturnString_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.ReturnStringAsync(); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_ReturnString_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.ReturnStringAsync(null); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_ReturnString_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.ReturnStringAsync(); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_ReturnUnknown_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.ReturnUnknownAsync(null); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_ReturnUnknown_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.ReturnUnknownAsync(); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_ReturnUnknown_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.ReturnUnknownAsync(null); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_ReturnUnknown_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.ReturnUnknownAsync(); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_RecursiveExtension_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + level = 123, + }); + Response response = await client.RecursiveExtensionAsync(content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_RecursiveExtension_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Extension input = new Extension(123); + Response response = await client.RecursiveExtensionAsync(input); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_RecursiveExtension_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + level = 123, + extension = new object[] + { +null + }, + }); + Response response = await client.RecursiveExtensionAsync(content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_RecursiveExtension_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Extension input = new Extension(123) + { + Extension = { default }, + }; + Response response = await client.RecursiveExtensionAsync(input); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_ThreeLevelRecursive_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.ThreeLevelRecursiveAsync(content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_ThreeLevelRecursive_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Extendible input = new Extendible(); + Response response = await client.ThreeLevelRecursiveAsync(input); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_ThreeLevelRecursive_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + extension = new object[] + { +new +{ +level = 123, +extension = new object[] +{ +null +}, +} + }, + }); + Response response = await client.ThreeLevelRecursiveAsync(content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_ThreeLevelRecursive_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Extendible input = new Extendible + { + Extension = {new ThereLevelExtension(123) +{ +Extension = {default}, +}}, + }; + Response response = await client.ThreeLevelRecursiveAsync(input); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_RecursiveModels_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + parent = new object[] + { +new +{ +level = 123, +} + }, + level = 123, + }); + Response response = await client.RecursiveModelsAsync(content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_RecursiveModels_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + ChildModel input = new ChildModel(123, new BaseModel[] + { +new BaseModel(123) + }); + Response response = await client.RecursiveModelsAsync(input); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_RecursiveModels_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + parent = new object[] + { +new +{ +level = 123, +} + }, + level = 123, + }); + Response response = await client.RecursiveModelsAsync(content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_RecursiveModels_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + ChildModel input = new ChildModel(123, new BaseModel[] + { +new BaseModel(123) + }); + Response response = await client.RecursiveModelsAsync(input); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_ContainSelfModels_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new { }); + Response response = await client.ContainSelfModelsAsync(content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_ContainSelfModels_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + ContainSelf input = new ContainSelf(default); + Response response = await client.ContainSelfModelsAsync(input); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_ContainSelfModels_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new { }); + Response response = await client.ContainSelfModelsAsync(content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_ContainSelfModels_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + ContainSelf input = new ContainSelf(default); + Response response = await client.ContainSelfModelsAsync(input); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_EnumParameter_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.EnumParameterAsync(1.1F); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_EnumParameter_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.EnumParameterAsync(CsProjectedEnum.CsOne); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_EnumParameter_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.EnumParameterAsync(1.1F); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_EnumParameter_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.EnumParameterAsync(CsProjectedEnum.CsOne); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_BodyIsModelWithProjectedEnum_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + enumProperty = 1.1F, + }); + Response response = await client.BodyIsModelWithProjectedEnumAsync(content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_BodyIsModelWithProjectedEnum_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + ModelWithProjectedEnum body = new ModelWithProjectedEnum(CsProjectedEnumInModel.CsOne); + Response response = await client.BodyIsModelWithProjectedEnumAsync(body); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_BodyIsModelWithProjectedEnum_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + enumProperty = 1.1F, + }); + Response response = await client.BodyIsModelWithProjectedEnumAsync(content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_BodyIsModelWithProjectedEnum_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + ModelWithProjectedEnum body = new ModelWithProjectedEnum(CsProjectedEnumInModel.CsOne); + Response response = await client.BodyIsModelWithProjectedEnumAsync(body); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_OptionalDictionary_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = null; + Response response = await client.OptionalDictionaryAsync(content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_OptionalDictionary_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.OptionalDictionaryAsync(); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_OptionalDictionary_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + key = 1234, + }); + Response response = await client.OptionalDictionaryAsync(content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_OptionalDictionary_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.OptionalDictionaryAsync(body: new Dictionary + { + ["key"] = 1234 + }); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_AzureLocationOp_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = null; + Response response = await client.AzureLocationOpAsync(new AzureLocation(""), new AzureLocation(""), content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_AzureLocationOp_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + Response response = await client.AzureLocationOpAsync(new AzureLocation(""), new AzureLocation("")); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_AzureLocationOp_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + location = "", + }); + Response response = await client.AzureLocationOpAsync(new AzureLocation(""), new AzureLocation(""), content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task FirstTestTypeSpec_AzureLocationOp_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + FirstTestTypeSpecClient client = CreateFirstTestTypeSpecClient(endpoint, credential); + + AzureLocationModel body = new AzureLocationModel(new AzureLocation("")); + Response response = await client.AzureLocationOpAsync(new AzureLocation(""), new AzureLocation(""), body: body); } } } diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/GlossaryTests.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/GlossaryTests.cs new file mode 100644 index 00000000000..dba3cc8d124 --- /dev/null +++ b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/GlossaryTests.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Identity; +using FirstTestTypeSpec.Models; +using NUnit.Framework; + +namespace FirstTestTypeSpec.Tests +{ + public partial class GlossaryTests : FirstTestTypeSpecTestBase + { + public GlossaryTests(bool isAsync) : base(isAsync) + { + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task Glossary_DoSomething_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + Glossary client = CreateFirstTestTypeSpecClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.DoSomethingAsync("", "

", null); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task Glossary_DoSomething_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + Glossary client = CreateFirstTestTypeSpecClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.DoSomethingAsync("", "

"); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task Glossary_DoSomething_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + Glossary client = CreateFirstTestTypeSpecClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.DoSomethingAsync("", "

", null); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task Glossary_DoSomething_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + Glossary client = CreateFirstTestTypeSpecClient(endpoint, credential).GetGlossaryClient(); + + Response response = await client.DoSomethingAsync("", "

"); + } + } +} diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/HelloDemo2Tests.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/HelloDemo2Tests.cs new file mode 100644 index 00000000000..e6c18c41f51 --- /dev/null +++ b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/HelloDemo2Tests.cs @@ -0,0 +1,581 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Identity; +using FirstTestTypeSpec.Models; +using NUnit.Framework; + +namespace FirstTestTypeSpec.Tests +{ + public partial class HelloDemo2Tests : FirstTestTypeSpecTestBase + { + public HelloDemo2Tests(bool isAsync) : base(isAsync) + { + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task Demo2_HelloAgain_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); + + using RequestContent content = RequestContent.Create(new + { + requiredString = "", + requiredInt = 1234, + requiredCollection = new object[] + { +"1" + }, + requiredDictionary = new + { + key = "1", + }, + requiredModel = new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + requiredBadDescription = "", + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + }, + requiredUnknown = new object(), + requiredRecordUnknown = new + { + key = new object(), + }, + modelWithRequiredNullable = new + { + requiredNullablePrimitive = 1234, + requiredExtensibleEnum = "1", + requiredFixedEnum = "1", + }, + unionList = new object[] + { +"" + }, + }); + Response response = await client.HelloAgainAsync("", "", content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task Demo2_HelloAgain_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); + + RoundTripModel action = new RoundTripModel( + "", + 1234, + new StringFixedEnum[] { StringFixedEnum.One }, + new Dictionary + { + ["key"] = StringExtensibleEnum.One + }, + new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default), + BinaryData.FromObjectAsJson(new object()), + new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + new ModelWithRequiredNullableProperties(1234, StringExtensibleEnum.One, StringFixedEnum.One), + new BinaryData[] + { +BinaryData.FromObjectAsJson("") + }); + Response response = await client.HelloAgainAsync("", "", action); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task Demo2_HelloAgain_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); + + using RequestContent content = RequestContent.Create(new + { + requiredString = "", + requiredInt = 1234, + requiredCollection = new object[] + { +"1" + }, + requiredDictionary = new + { + key = "1", + }, + requiredModel = new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + optionalLiteralString = "reject", + optionalLiteralInt = 456, + optionalLiteralFloat = 4.56F, + optionalLiteralBool = true, + requiredBadDescription = "", + optionalNullableList = new object[] + { +1234 + }, + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + optionalFloatProperty = new object(), + optionalResourceId = "", + }, + intExtensibleEnum = 1, + intExtensibleEnumCollection = new object[] + { +1 + }, + floatExtensibleEnum = 1F, + floatExtensibleEnumCollection = new object[] + { +1F + }, + floatFixedEnum = 1.1F, + floatFixedEnumCollection = new object[] + { +1.1F + }, + intFixedEnum = 1, + intFixedEnumCollection = new object[] + { +1 + }, + stringFixedEnum = "1", + requiredUnknown = new object(), + optionalUnknown = new object(), + requiredRecordUnknown = new + { + key = new object(), + }, + optionalRecordUnknown = new + { + key = new object(), + }, + modelWithRequiredNullable = new + { + requiredNullablePrimitive = 1234, + requiredExtensibleEnum = "1", + requiredFixedEnum = "1", + }, + unionList = new object[] + { +"" + }, + }); + Response response = await client.HelloAgainAsync("", "", content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task Demo2_HelloAgain_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); + + RoundTripModel action = new RoundTripModel( + "", + 1234, + new StringFixedEnum[] { StringFixedEnum.One }, + new Dictionary + { + ["key"] = StringExtensibleEnum.One + }, + new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default) + { + OptionalLiteralString = ThingOptionalLiteralString.Reject, + OptionalLiteralInt = ThingOptionalLiteralInt._456, + OptionalLiteralFloat = ThingOptionalLiteralFloat._456, + OptionalLiteralBool = true, + OptionalNullableList = { 1234 }, + OptionalFloatProperty = (double)default, + OptionalResourceId = new ResourceIdentifier(""), + }, + BinaryData.FromObjectAsJson(new object()), + new Dictionary + { + ["key"] = BinaryData.FromObjectAsJson(new object()) + }, + new ModelWithRequiredNullableProperties(1234, StringExtensibleEnum.One, StringFixedEnum.One), + new BinaryData[] + { +BinaryData.FromObjectAsJson("") + }) + { + IntExtensibleEnum = IntExtensibleEnum.One, + IntExtensibleEnumCollection = { IntExtensibleEnum.One }, + FloatExtensibleEnum = FloatExtensibleEnum.One, + FloatExtensibleEnumCollection = { FloatExtensibleEnum.One }, + FloatFixedEnum = FloatFixedEnum.One, + FloatFixedEnumCollection = { FloatFixedEnum.One }, + IntFixedEnum = IntFixedEnum.One, + IntFixedEnumCollection = { IntFixedEnum.One }, + StringFixedEnum = StringFixedEnum.One, + OptionalUnknown = BinaryData.FromObjectAsJson(new object()), + OptionalRecordUnknown = +{ +["key"] = BinaryData.FromObjectAsJson(new object()) +}, + }; + Response response = await client.HelloAgainAsync("", "", action); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task Demo2_NoContentType_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); + + using RequestContent content = RequestContent.Create(new + { + requiredString = "", + requiredInt = 1234, + requiredCollection = new object[] + { +"1" + }, + requiredDictionary = new + { + key = "1", + }, + requiredModel = new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + requiredBadDescription = "", + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + }, + requiredUnknown = new object(), + requiredRecordUnknown = new + { + key = new object(), + }, + modelWithRequiredNullable = new + { + requiredNullablePrimitive = 1234, + requiredExtensibleEnum = "1", + requiredFixedEnum = "1", + }, + unionList = new object[] + { +"" + }, + }); + Response response = await client.NoContentTypeAsync("", "", content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task Demo2_NoContentType_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); + + using RequestContent content = RequestContent.Create(new + { + requiredString = "", + requiredInt = 1234, + requiredCollection = new object[] + { +"1" + }, + requiredDictionary = new + { + key = "1", + }, + requiredModel = new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + optionalLiteralString = "reject", + optionalLiteralInt = 456, + optionalLiteralFloat = 4.56F, + optionalLiteralBool = true, + requiredBadDescription = "", + optionalNullableList = new object[] + { +1234 + }, + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + optionalFloatProperty = new object(), + optionalResourceId = "", + }, + intExtensibleEnum = 1, + intExtensibleEnumCollection = new object[] + { +1 + }, + floatExtensibleEnum = 1F, + floatExtensibleEnumCollection = new object[] + { +1F + }, + floatFixedEnum = 1.1F, + floatFixedEnumCollection = new object[] + { +1.1F + }, + intFixedEnum = 1, + intFixedEnumCollection = new object[] + { +1 + }, + stringFixedEnum = "1", + requiredUnknown = new object(), + optionalUnknown = new object(), + requiredRecordUnknown = new + { + key = new object(), + }, + optionalRecordUnknown = new + { + key = new object(), + }, + modelWithRequiredNullable = new + { + requiredNullablePrimitive = 1234, + requiredExtensibleEnum = "1", + requiredFixedEnum = "1", + }, + unionList = new object[] + { +"" + }, + }); + Response response = await client.NoContentTypeAsync("", "", content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task Demo2_HelloDemoAgain_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); + + Response response = await client.HelloDemoAgainAsync(null); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task Demo2_HelloDemoAgain_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); + + Response response = await client.HelloDemoAgainAsync(); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task Demo2_HelloDemoAgain_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); + + Response response = await client.HelloDemoAgainAsync(null); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task Demo2_HelloDemoAgain_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); + + Response response = await client.HelloDemoAgainAsync(); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task Demo2_CreateLiteral_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); + + using RequestContent content = RequestContent.Create(new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + requiredBadDescription = "", + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + }); + Response response = await client.CreateLiteralAsync(content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task Demo2_CreateLiteral_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); + + Thing body = new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default); + Response response = await client.CreateLiteralAsync(body); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task Demo2_CreateLiteral_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); + + using RequestContent content = RequestContent.Create(new + { + name = "", + requiredUnion = "", + requiredLiteralString = "accept", + requiredLiteralInt = 123, + requiredLiteralFloat = 1.23F, + requiredLiteralBool = false, + optionalLiteralString = "reject", + optionalLiteralInt = 456, + optionalLiteralFloat = 4.56F, + optionalLiteralBool = true, + requiredBadDescription = "", + optionalNullableList = new object[] + { +1234 + }, + requiredNullableList = new object[] + { +1234 + }, + requiredFloatProperty = new object(), + optionalFloatProperty = new object(), + optionalResourceId = "", + }); + Response response = await client.CreateLiteralAsync(content); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task Demo2_CreateLiteral_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); + + Thing body = new Thing("", BinaryData.FromObjectAsJson(""), "", new int[] { 1234 }, (double)default) + { + OptionalLiteralString = ThingOptionalLiteralString.Reject, + OptionalLiteralInt = ThingOptionalLiteralInt._456, + OptionalLiteralFloat = ThingOptionalLiteralFloat._456, + OptionalLiteralBool = true, + OptionalNullableList = { 1234 }, + OptionalFloatProperty = (double)default, + OptionalResourceId = new ResourceIdentifier(""), + }; + Response response = await client.CreateLiteralAsync(body); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task Demo2_HelloLiteral_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); + + Response response = await client.HelloLiteralAsync(null); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task Demo2_HelloLiteral_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); + + Response response = await client.HelloLiteralAsync(); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task Demo2_HelloLiteral_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); + + Response response = await client.HelloLiteralAsync(null); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task Demo2_HelloLiteral_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + HelloDemo2 client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemo2Client(); + + Response response = await client.HelloLiteralAsync(); + } + } +} diff --git a/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/HelloDemoTests.cs b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/HelloDemoTests.cs new file mode 100644 index 00000000000..78586e0be8f --- /dev/null +++ b/test/TestProjects/FirstTest-TypeSpec/tests/Generated/Tests/HelloDemoTests.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure; +using Azure.Identity; +using NUnit.Framework; + +namespace FirstTestTypeSpec.Tests +{ + public partial class HelloDemoTests : FirstTestTypeSpecTestBase + { + public HelloDemoTests(bool isAsync) : base(isAsync) + { + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task Demo_SayHi_ShortVersion() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + HelloDemo client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemoClient(); + + Response response = await client.SayHiAsync("", "", null, null); + } + + [Test] + [Ignore("Please remove the Ignore attribute to let the test method run")] + public async Task Demo_SayHi_AllParameters() + { + Uri endpoint = new Uri(""); + AzureKeyCredential credential = null; + HelloDemo client = CreateFirstTestTypeSpecClient(endpoint, credential).GetHelloClient().GetHelloDemoClient(); + + Response response = await client.SayHiAsync("", "", "", null); + } + } +} diff --git a/test/TestProjects/FirstTest-TypeSpec/tspCodeModel.json b/test/TestProjects/FirstTest-TypeSpec/tspCodeModel.json index 9287428e5ef..c641913b75d 100644 --- a/test/TestProjects/FirstTest-TypeSpec/tspCodeModel.json +++ b/test/TestProjects/FirstTest-TypeSpec/tspCodeModel.json @@ -2497,59 +2497,10 @@ "GenerateProtocolMethod": true, "GenerateConvenienceMethod": true, "CrossLanguageDefinitionId": "FirstTestTypeSpec.topAction", - "Decorators": [], - "Examples": [ - { - "$id": "301", - "kind": "http", - "name": "For test topAction", - "description": "For test topAction", - "filePath": "2022-05-15-preview/FirstTestTypeSpec_TopAction.json", - "rawExample": { - "$id": "302", - "operationId": "TopAction", - "title": "For test topAction", - "parameters": { - "$id": "303", - "action": "2024-05-06T12:20-12Z" - }, - "responses": { - "200": { - "$id": "305", - "body": { - "$id": "306", - "name": "test", - "requiredUnion": [ - "a", - "b", - "c" - ] - } - }, - "$id": "304" - } - }, - "parameters": [ - { - "$id": "307", - "parameter": { - "$ref": "294" - }, - "value": { - "$id": "308", - "kind": "string", - "type": { - "$ref": "295" - }, - "value": "2024-05-06T12:20-12Z" - } - } - ] - } - ] + "Decorators": [] }, { - "$id": "309", + "$id": "301", "Name": "topAction2", "ResourceName": "FirstTestTypeSpec", "Description": "top level method2", @@ -2559,14 +2510,14 @@ "$ref": "292" }, { - "$id": "310", + "$id": "302", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "311", + "$id": "303", "Kind": "constant", "ValueType": { - "$id": "312", + "$id": "304", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -2587,7 +2538,7 @@ ], "Responses": [ { - "$id": "313", + "$id": "305", "StatusCodes": [ 200 ], @@ -2613,7 +2564,7 @@ "Decorators": [] }, { - "$id": "314", + "$id": "306", "Name": "patchAction", "ResourceName": "FirstTestTypeSpec", "Description": "top level patch", @@ -2623,15 +2574,15 @@ "$ref": "292" }, { - "$id": "315", + "$id": "307", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "316", + "$id": "308", "Kind": "constant", "ValueType": { - "$id": "317", + "$id": "309", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -2650,14 +2601,14 @@ "Decorators": [] }, { - "$id": "318", + "$id": "310", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "319", + "$id": "311", "Kind": "constant", "ValueType": { - "$id": "320", + "$id": "312", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -2676,7 +2627,7 @@ "Decorators": [] }, { - "$id": "321", + "$id": "313", "Name": "body", "NameInRequest": "body", "Type": { @@ -2694,7 +2645,7 @@ ], "Responses": [ { - "$id": "322", + "$id": "314", "StatusCodes": [ 200 ], @@ -2723,7 +2674,7 @@ "Decorators": [] }, { - "$id": "323", + "$id": "315", "Name": "anonymousBody", "ResourceName": "FirstTestTypeSpec", "Description": "body parameter without body decorator", @@ -2733,15 +2684,15 @@ "$ref": "292" }, { - "$id": "324", + "$id": "316", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "325", + "$id": "317", "Kind": "constant", "ValueType": { - "$id": "326", + "$id": "318", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -2760,14 +2711,14 @@ "Decorators": [] }, { - "$id": "327", + "$id": "319", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "328", + "$id": "320", "Kind": "constant", "ValueType": { - "$id": "329", + "$id": "321", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -2786,7 +2737,7 @@ "Decorators": [] }, { - "$id": "330", + "$id": "322", "Name": "anonymousBodyRequest", "NameInRequest": "anonymousBodyRequest", "Type": { @@ -2804,7 +2755,7 @@ ], "Responses": [ { - "$id": "331", + "$id": "323", "StatusCodes": [ 200 ], @@ -2833,7 +2784,7 @@ "Decorators": [] }, { - "$id": "332", + "$id": "324", "Name": "friendlyModel", "ResourceName": "FirstTestTypeSpec", "Description": "Model can have its friendly name", @@ -2843,15 +2794,15 @@ "$ref": "292" }, { - "$id": "333", + "$id": "325", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "334", + "$id": "326", "Kind": "constant", "ValueType": { - "$id": "335", + "$id": "327", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -2870,14 +2821,14 @@ "Decorators": [] }, { - "$id": "336", + "$id": "328", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "337", + "$id": "329", "Kind": "constant", "ValueType": { - "$id": "338", + "$id": "330", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -2896,7 +2847,7 @@ "Decorators": [] }, { - "$id": "339", + "$id": "331", "Name": "friendlyModelRequest", "NameInRequest": "friendlyModelRequest", "Type": { @@ -2914,7 +2865,7 @@ ], "Responses": [ { - "$id": "340", + "$id": "332", "StatusCodes": [ 200 ], @@ -2943,7 +2894,7 @@ "Decorators": [] }, { - "$id": "341", + "$id": "333", "Name": "addTimeHeader", "ResourceName": "FirstTestTypeSpec", "Accessibility": "public", @@ -2952,16 +2903,16 @@ "$ref": "292" }, { - "$id": "342", + "$id": "334", "Name": "repeatabilityFirstSent", "NameInRequest": "Repeatability-First-Sent", "Type": { - "$id": "343", + "$id": "335", "Kind": "utcDateTime", "Name": "utcDateTime", "Encode": "rfc7231", "WireType": { - "$id": "344", + "$id": "336", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -2982,7 +2933,7 @@ ], "Responses": [ { - "$id": "345", + "$id": "337", "StatusCodes": [ 204 ], @@ -3002,7 +2953,7 @@ "Decorators": [] }, { - "$id": "346", + "$id": "338", "Name": "stringFormat", "ResourceName": "FirstTestTypeSpec", "Description": "paramete has string format.", @@ -3012,16 +2963,16 @@ "$ref": "292" }, { - "$id": "347", + "$id": "339", "Name": "subscriptionId", "NameInRequest": "subscriptionId", "Type": { - "$id": "348", + "$id": "340", "Kind": "string", "Name": "uuid", "CrossLanguageDefinitionId": "Azure.Core.uuid", "BaseType": { - "$id": "349", + "$id": "341", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3039,15 +2990,15 @@ "Decorators": [] }, { - "$id": "350", + "$id": "342", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "351", + "$id": "343", "Kind": "constant", "ValueType": { - "$id": "352", + "$id": "344", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3066,7 +3017,7 @@ "Decorators": [] }, { - "$id": "353", + "$id": "345", "Name": "body", "NameInRequest": "body", "Type": { @@ -3084,7 +3035,7 @@ ], "Responses": [ { - "$id": "354", + "$id": "346", "StatusCodes": [ 204 ], @@ -3107,7 +3058,7 @@ "Decorators": [] }, { - "$id": "355", + "$id": "347", "Name": "projectedNameModel", "ResourceName": "FirstTestTypeSpec", "Description": "Model can have its projected name", @@ -3117,15 +3068,15 @@ "$ref": "292" }, { - "$id": "356", + "$id": "348", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "357", + "$id": "349", "Kind": "constant", "ValueType": { - "$id": "358", + "$id": "350", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3144,14 +3095,14 @@ "Decorators": [] }, { - "$id": "359", + "$id": "351", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "360", + "$id": "352", "Kind": "constant", "ValueType": { - "$id": "361", + "$id": "353", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3170,7 +3121,7 @@ "Decorators": [] }, { - "$id": "362", + "$id": "354", "Name": "projectedNameModelRequest", "NameInRequest": "projectedNameModelRequest", "Type": { @@ -3188,7 +3139,7 @@ ], "Responses": [ { - "$id": "363", + "$id": "355", "StatusCodes": [ 200 ], @@ -3217,7 +3168,7 @@ "Decorators": [] }, { - "$id": "364", + "$id": "356", "Name": "returnsAnonymousModel", "ResourceName": "FirstTestTypeSpec", "Description": "return anonymous model", @@ -3227,14 +3178,14 @@ "$ref": "292" }, { - "$id": "365", + "$id": "357", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "366", + "$id": "358", "Kind": "constant", "ValueType": { - "$id": "367", + "$id": "359", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3255,7 +3206,7 @@ ], "Responses": [ { - "$id": "368", + "$id": "360", "StatusCodes": [ 200 ], @@ -3281,7 +3232,7 @@ "Decorators": [] }, { - "$id": "369", + "$id": "361", "Name": "headAsBoolean", "ResourceName": "FirstTestTypeSpec", "Description": "head as boolean.", @@ -3291,11 +3242,11 @@ "$ref": "292" }, { - "$id": "370", + "$id": "362", "Name": "id", "NameInRequest": "id", "Type": { - "$id": "371", + "$id": "363", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3313,7 +3264,7 @@ ], "Responses": [ { - "$id": "372", + "$id": "364", "StatusCodes": [ 204 ], @@ -3333,7 +3284,7 @@ "Decorators": [] }, { - "$id": "373", + "$id": "365", "Name": "stringBody", "ResourceName": "FirstTestTypeSpec", "Description": "The body parameter type is string.", @@ -3343,15 +3294,15 @@ "$ref": "292" }, { - "$id": "374", + "$id": "366", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "375", + "$id": "367", "Kind": "constant", "ValueType": { - "$id": "376", + "$id": "368", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3370,11 +3321,11 @@ "Decorators": [] }, { - "$id": "377", + "$id": "369", "Name": "body", "NameInRequest": "body", "Type": { - "$id": "378", + "$id": "370", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3392,7 +3343,7 @@ ], "Responses": [ { - "$id": "379", + "$id": "371", "StatusCodes": [ 204 ], @@ -3415,7 +3366,7 @@ "Decorators": [] }, { - "$id": "380", + "$id": "372", "Name": "boolBody", "ResourceName": "FirstTestTypeSpec", "Description": "The body parameter type is bool.", @@ -3425,15 +3376,15 @@ "$ref": "292" }, { - "$id": "381", + "$id": "373", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "382", + "$id": "374", "Kind": "constant", "ValueType": { - "$id": "383", + "$id": "375", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3452,11 +3403,11 @@ "Decorators": [] }, { - "$id": "384", + "$id": "376", "Name": "body", "NameInRequest": "body", "Type": { - "$id": "385", + "$id": "377", "Kind": "boolean", "Name": "boolean", "CrossLanguageDefinitionId": "TypeSpec.boolean", @@ -3474,7 +3425,7 @@ ], "Responses": [ { - "$id": "386", + "$id": "378", "StatusCodes": [ 204 ], @@ -3497,7 +3448,7 @@ "Decorators": [] }, { - "$id": "387", + "$id": "379", "Name": "dateTimeBody", "ResourceName": "FirstTestTypeSpec", "Description": "The body parameter type is datetime.", @@ -3507,15 +3458,15 @@ "$ref": "292" }, { - "$id": "388", + "$id": "380", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "389", + "$id": "381", "Kind": "constant", "ValueType": { - "$id": "390", + "$id": "382", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3534,16 +3485,16 @@ "Decorators": [] }, { - "$id": "391", + "$id": "383", "Name": "body", "NameInRequest": "body", "Type": { - "$id": "392", + "$id": "384", "Kind": "utcDateTime", "Name": "utcDateTime", "Encode": "rfc3339", "WireType": { - "$id": "393", + "$id": "385", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3564,7 +3515,7 @@ ], "Responses": [ { - "$id": "394", + "$id": "386", "StatusCodes": [ 204 ], @@ -3587,7 +3538,7 @@ "Decorators": [] }, { - "$id": "395", + "$id": "387", "Name": "returnString", "ResourceName": "FirstTestTypeSpec", "Description": "The return type is datetime.", @@ -3597,14 +3548,14 @@ "$ref": "292" }, { - "$id": "396", + "$id": "388", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "397", + "$id": "389", "Kind": "constant", "ValueType": { - "$id": "398", + "$id": "390", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3625,12 +3576,12 @@ ], "Responses": [ { - "$id": "399", + "$id": "391", "StatusCodes": [ 200 ], "BodyType": { - "$id": "400", + "$id": "392", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3655,7 +3606,7 @@ "Decorators": [] }, { - "$id": "401", + "$id": "393", "Name": "returnUnknown", "ResourceName": "FirstTestTypeSpec", "Accessibility": "public", @@ -3664,14 +3615,14 @@ "$ref": "292" }, { - "$id": "402", + "$id": "394", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "403", + "$id": "395", "Kind": "constant", "ValueType": { - "$id": "404", + "$id": "396", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3692,12 +3643,12 @@ ], "Responses": [ { - "$id": "405", + "$id": "397", "StatusCodes": [ 200 ], "BodyType": { - "$id": "406", + "$id": "398", "Kind": "any", "Name": "unknown", "CrossLanguageDefinitionId": "", @@ -3722,7 +3673,7 @@ "Decorators": [] }, { - "$id": "407", + "$id": "399", "Name": "recursiveExtension", "ResourceName": "FirstTestTypeSpec", "Description": "test parent reference child", @@ -3732,15 +3683,15 @@ "$ref": "292" }, { - "$id": "408", + "$id": "400", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "409", + "$id": "401", "Kind": "constant", "ValueType": { - "$id": "410", + "$id": "402", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3759,7 +3710,7 @@ "Decorators": [] }, { - "$id": "411", + "$id": "403", "Name": "input", "NameInRequest": "input", "Type": { @@ -3777,7 +3728,7 @@ ], "Responses": [ { - "$id": "412", + "$id": "404", "StatusCodes": [ 204 ], @@ -3800,7 +3751,7 @@ "Decorators": [] }, { - "$id": "413", + "$id": "405", "Name": "threeLevelRecursive", "ResourceName": "FirstTestTypeSpec", "Description": "test three level recursive extension", @@ -3810,15 +3761,15 @@ "$ref": "292" }, { - "$id": "414", + "$id": "406", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "415", + "$id": "407", "Kind": "constant", "ValueType": { - "$id": "416", + "$id": "408", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3837,7 +3788,7 @@ "Decorators": [] }, { - "$id": "417", + "$id": "409", "Name": "input", "NameInRequest": "input", "Type": { @@ -3855,7 +3806,7 @@ ], "Responses": [ { - "$id": "418", + "$id": "410", "StatusCodes": [ 204 ], @@ -3878,7 +3829,7 @@ "Decorators": [] }, { - "$id": "419", + "$id": "411", "Name": "recursiveModels", "ResourceName": "FirstTestTypeSpec", "Description": "test child reference parent", @@ -3888,15 +3839,15 @@ "$ref": "292" }, { - "$id": "420", + "$id": "412", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "421", + "$id": "413", "Kind": "constant", "ValueType": { - "$id": "422", + "$id": "414", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3915,7 +3866,7 @@ "Decorators": [] }, { - "$id": "423", + "$id": "415", "Name": "input", "NameInRequest": "input", "Type": { @@ -3933,7 +3884,7 @@ ], "Responses": [ { - "$id": "424", + "$id": "416", "StatusCodes": [ 204 ], @@ -3956,7 +3907,7 @@ "Decorators": [] }, { - "$id": "425", + "$id": "417", "Name": "ContainSelfModels", "ResourceName": "FirstTestTypeSpec", "Description": "test contain self models", @@ -3966,15 +3917,15 @@ "$ref": "292" }, { - "$id": "426", + "$id": "418", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "427", + "$id": "419", "Kind": "constant", "ValueType": { - "$id": "428", + "$id": "420", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -3993,7 +3944,7 @@ "Decorators": [] }, { - "$id": "429", + "$id": "421", "Name": "input", "NameInRequest": "input", "Type": { @@ -4011,7 +3962,7 @@ ], "Responses": [ { - "$id": "430", + "$id": "422", "StatusCodes": [ 204 ], @@ -4034,7 +3985,7 @@ "Decorators": [] }, { - "$id": "431", + "$id": "423", "Name": "enumParameter", "ResourceName": "FirstTestTypeSpec", "Description": "test enum parameter.", @@ -4044,7 +3995,7 @@ "$ref": "292" }, { - "$id": "432", + "$id": "424", "Name": "p1", "NameInRequest": "p1", "Type": { @@ -4062,7 +4013,7 @@ ], "Responses": [ { - "$id": "433", + "$id": "425", "StatusCodes": [ 204 ], @@ -4082,7 +4033,7 @@ "Decorators": [] }, { - "$id": "434", + "$id": "426", "Name": "bodyIsModelWithProjectedEnum", "ResourceName": "FirstTestTypeSpec", "Description": "test enum parameter.", @@ -4092,15 +4043,15 @@ "$ref": "292" }, { - "$id": "435", + "$id": "427", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "436", + "$id": "428", "Kind": "constant", "ValueType": { - "$id": "437", + "$id": "429", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4119,7 +4070,7 @@ "Decorators": [] }, { - "$id": "438", + "$id": "430", "Name": "body", "NameInRequest": "body", "Type": { @@ -4137,7 +4088,7 @@ ], "Responses": [ { - "$id": "439", + "$id": "431", "StatusCodes": [ 204 ], @@ -4160,7 +4111,7 @@ "Decorators": [] }, { - "$id": "440", + "$id": "432", "Name": "optionalDictionary", "ResourceName": "FirstTestTypeSpec", "Description": "test optional dictionary.", @@ -4170,15 +4121,15 @@ "$ref": "292" }, { - "$id": "441", + "$id": "433", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "442", + "$id": "434", "Kind": "constant", "ValueType": { - "$id": "443", + "$id": "435", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4197,21 +4148,21 @@ "Decorators": [] }, { - "$id": "444", + "$id": "436", "Name": "body", "NameInRequest": "body", "Type": { - "$id": "445", + "$id": "437", "Kind": "dict", "KeyType": { - "$id": "446", + "$id": "438", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", "Decorators": [] }, "ValueType": { - "$id": "447", + "$id": "439", "Kind": "int32", "Name": "int32", "CrossLanguageDefinitionId": "TypeSpec.int32", @@ -4231,7 +4182,7 @@ ], "Responses": [ { - "$id": "448", + "$id": "440", "StatusCodes": [ 204 ], @@ -4254,7 +4205,7 @@ "Decorators": [] }, { - "$id": "449", + "$id": "441", "Name": "azureLocationOp", "ResourceName": "FirstTestTypeSpec", "Description": "test optional dictionary.", @@ -4264,16 +4215,16 @@ "$ref": "292" }, { - "$id": "450", + "$id": "442", "Name": "location", "NameInRequest": "location", "Type": { - "$id": "451", + "$id": "443", "Kind": "string", "Name": "azureLocation", "CrossLanguageDefinitionId": "Azure.Core.azureLocation", "BaseType": { - "$id": "452", + "$id": "444", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4291,16 +4242,16 @@ "Decorators": [] }, { - "$id": "453", + "$id": "445", "Name": "regenLocation", "NameInRequest": "regen-location", "Type": { - "$id": "454", + "$id": "446", "Kind": "string", "Name": "azureLocation", "CrossLanguageDefinitionId": "Azure.Core.azureLocation", "BaseType": { - "$id": "455", + "$id": "447", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4318,15 +4269,15 @@ "Decorators": [] }, { - "$id": "456", + "$id": "448", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "457", + "$id": "449", "Kind": "constant", "ValueType": { - "$id": "458", + "$id": "450", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4345,7 +4296,7 @@ "Decorators": [] }, { - "$id": "459", + "$id": "451", "Name": "body", "NameInRequest": "body", "Type": { @@ -4363,7 +4314,7 @@ ], "Responses": [ { - "$id": "460", + "$id": "452", "StatusCodes": [ 204 ], @@ -4387,7 +4338,7 @@ } ], "Protocol": { - "$id": "461" + "$id": "453" }, "Parameters": [ { @@ -4397,20 +4348,20 @@ "Decorators": [] }, { - "$id": "462", + "$id": "454", "Name": "Hello", "Operations": [], "Protocol": { - "$id": "463" + "$id": "455" }, "Parent": "FirstTestTypeSpecClient", "Parameters": [ { - "$id": "464", + "$id": "456", "Name": "firstTestTypeSpecUrl", "NameInRequest": "firstTestTypeSpecUrl", "Type": { - "$id": "465", + "$id": "457", "Kind": "url", "Name": "url", "CrossLanguageDefinitionId": "TypeSpec.url" @@ -4429,23 +4380,23 @@ "Decorators": [] }, { - "$id": "466", + "$id": "458", "Name": "HelloDemo", "Description": "Hello world service", "Operations": [ { - "$id": "467", + "$id": "459", "Name": "sayHi", "ResourceName": "Demo", "Description": "Return hi", "Accessibility": "public", "Parameters": [ { - "$id": "468", + "$id": "460", "Name": "firstTestTypeSpecUrl", "NameInRequest": "firstTestTypeSpecUrl", "Type": { - "$id": "469", + "$id": "461", "Kind": "url", "Name": "url", "CrossLanguageDefinitionId": "TypeSpec.url" @@ -4461,11 +4412,11 @@ "Kind": "Client" }, { - "$id": "470", + "$id": "462", "Name": "headParameter", "NameInRequest": "head-parameter", "Type": { - "$id": "471", + "$id": "463", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4481,11 +4432,11 @@ "Decorators": [] }, { - "$id": "472", + "$id": "464", "Name": "queryParameter", "NameInRequest": "queryParameter", "Type": { - "$id": "473", + "$id": "465", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4501,11 +4452,11 @@ "Decorators": [] }, { - "$id": "474", + "$id": "466", "Name": "optionalQuery", "NameInRequest": "optionalQuery", "Type": { - "$id": "475", + "$id": "467", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4521,14 +4472,14 @@ "Decorators": [] }, { - "$id": "476", + "$id": "468", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "477", + "$id": "469", "Kind": "constant", "ValueType": { - "$id": "478", + "$id": "470", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4549,7 +4500,7 @@ ], "Responses": [ { - "$id": "479", + "$id": "471", "StatusCodes": [ 200 ], @@ -4576,33 +4527,33 @@ } ], "Protocol": { - "$id": "480" + "$id": "472" }, "Parent": "Hello", "Parameters": [ { - "$ref": "468" + "$ref": "460" } ], "Decorators": [] }, { - "$id": "481", + "$id": "473", "Name": "HelloDemo2", "Operations": [ { - "$id": "482", + "$id": "474", "Name": "helloAgain", "ResourceName": "Demo2", "Description": "Return hi again", "Accessibility": "public", "Parameters": [ { - "$id": "483", + "$id": "475", "Name": "firstTestTypeSpecUrl", "NameInRequest": "firstTestTypeSpecUrl", "Type": { - "$id": "484", + "$id": "476", "Kind": "url", "Name": "url", "CrossLanguageDefinitionId": "TypeSpec.url" @@ -4618,11 +4569,11 @@ "Kind": "Client" }, { - "$id": "485", + "$id": "477", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "486", + "$id": "478", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4638,14 +4589,14 @@ "Decorators": [] }, { - "$id": "487", + "$id": "479", "Name": "contentType", "NameInRequest": "Content-Type", "Type": { - "$id": "488", + "$id": "480", "Kind": "constant", "ValueType": { - "$id": "489", + "$id": "481", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4664,11 +4615,11 @@ "Decorators": [] }, { - "$id": "490", + "$id": "482", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "491", + "$id": "483", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4684,14 +4635,14 @@ "Decorators": [] }, { - "$id": "492", + "$id": "484", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "493", + "$id": "485", "Kind": "constant", "ValueType": { - "$id": "494", + "$id": "486", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4710,7 +4661,7 @@ "Decorators": [] }, { - "$id": "495", + "$id": "487", "Name": "action", "NameInRequest": "action", "Type": { @@ -4728,7 +4679,7 @@ ], "Responses": [ { - "$id": "496", + "$id": "488", "StatusCodes": [ 200 ], @@ -4757,21 +4708,21 @@ "Decorators": [] }, { - "$id": "497", + "$id": "489", "Name": "noContentType", "ResourceName": "Demo2", "Description": "Return hi again", "Accessibility": "public", "Parameters": [ { - "$ref": "483" + "$ref": "475" }, { - "$id": "498", + "$id": "490", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "499", + "$id": "491", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4787,11 +4738,11 @@ "Decorators": [] }, { - "$id": "500", + "$id": "492", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "501", + "$id": "493", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4807,15 +4758,15 @@ "Decorators": [] }, { - "$id": "502", + "$id": "494", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "503", + "$id": "495", "Kind": "constant", "ValueType": { - "$id": "504", + "$id": "496", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4834,14 +4785,14 @@ "Decorators": [] }, { - "$id": "505", + "$id": "497", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "506", + "$id": "498", "Kind": "constant", "ValueType": { - "$id": "507", + "$id": "499", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4860,7 +4811,7 @@ "Decorators": [] }, { - "$id": "508", + "$id": "500", "Name": "action", "NameInRequest": "action", "Type": { @@ -4878,7 +4829,7 @@ ], "Responses": [ { - "$id": "509", + "$id": "501", "StatusCodes": [ 200 ], @@ -4907,24 +4858,24 @@ "Decorators": [] }, { - "$id": "510", + "$id": "502", "Name": "helloDemoAgain", "ResourceName": "Demo2", "Description": "Return hi in demo2", "Accessibility": "public", "Parameters": [ { - "$ref": "483" + "$ref": "475" }, { - "$id": "511", + "$id": "503", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "512", + "$id": "504", "Kind": "constant", "ValueType": { - "$id": "513", + "$id": "505", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4945,7 +4896,7 @@ ], "Responses": [ { - "$id": "514", + "$id": "506", "StatusCodes": [ 200 ], @@ -4971,25 +4922,25 @@ "Decorators": [] }, { - "$id": "515", + "$id": "507", "Name": "createLiteral", "ResourceName": "Demo2", "Description": "Create with literal value", "Accessibility": "public", "Parameters": [ { - "$ref": "483" + "$ref": "475" }, { - "$id": "516", + "$id": "508", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "517", + "$id": "509", "Kind": "constant", "ValueType": { - "$id": "518", + "$id": "510", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -5008,14 +4959,14 @@ "Decorators": [] }, { - "$id": "519", + "$id": "511", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "520", + "$id": "512", "Kind": "constant", "ValueType": { - "$id": "521", + "$id": "513", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -5034,7 +4985,7 @@ "Decorators": [] }, { - "$id": "522", + "$id": "514", "Name": "body", "NameInRequest": "body", "Type": { @@ -5052,7 +5003,7 @@ ], "Responses": [ { - "$id": "523", + "$id": "515", "StatusCodes": [ 200 ], @@ -5081,24 +5032,24 @@ "Decorators": [] }, { - "$id": "524", + "$id": "516", "Name": "helloLiteral", "ResourceName": "Demo2", "Description": "Send literal parameters", "Accessibility": "public", "Parameters": [ { - "$ref": "483" + "$ref": "475" }, { - "$id": "525", + "$id": "517", "Name": "p1", "NameInRequest": "p1", "Type": { - "$id": "526", + "$id": "518", "Kind": "constant", "ValueType": { - "$id": "527", + "$id": "519", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -5117,14 +5068,14 @@ "Decorators": [] }, { - "$id": "528", + "$id": "520", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "529", + "$id": "521", "Kind": "constant", "ValueType": { - "$id": "530", + "$id": "522", "Kind": "int32", "Name": "int32", "CrossLanguageDefinitionId": "TypeSpec.int32", @@ -5143,14 +5094,14 @@ "Decorators": [] }, { - "$id": "531", + "$id": "523", "Name": "p3", "NameInRequest": "p3", "Type": { - "$id": "532", + "$id": "524", "Kind": "constant", "ValueType": { - "$id": "533", + "$id": "525", "Kind": "boolean", "Name": "boolean", "CrossLanguageDefinitionId": "TypeSpec.boolean", @@ -5169,14 +5120,14 @@ "Decorators": [] }, { - "$id": "534", + "$id": "526", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "535", + "$id": "527", "Kind": "constant", "ValueType": { - "$id": "536", + "$id": "528", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -5197,7 +5148,7 @@ ], "Responses": [ { - "$id": "537", + "$id": "529", "StatusCodes": [ 200 ], @@ -5224,33 +5175,33 @@ } ], "Protocol": { - "$id": "538" + "$id": "530" }, "Parent": "Hello", "Parameters": [ { - "$ref": "483" + "$ref": "475" } ], "Decorators": [] }, { - "$id": "539", + "$id": "531", "Name": "EnumTest", "Operations": [ { - "$id": "540", + "$id": "532", "Name": "createUnknownValue", "ResourceName": "EnumTest", "Description": "get extensible enum", "Accessibility": "public", "Parameters": [ { - "$id": "541", + "$id": "533", "Name": "firstTestTypeSpecUrl", "NameInRequest": "firstTestTypeSpecUrl", "Type": { - "$id": "542", + "$id": "534", "Kind": "url", "Name": "url", "CrossLanguageDefinitionId": "TypeSpec.url" @@ -5266,15 +5217,15 @@ "Kind": "Client" }, { - "$id": "543", + "$id": "535", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "544", + "$id": "536", "Kind": "constant", "ValueType": { - "$id": "545", + "$id": "537", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -5293,7 +5244,7 @@ "Decorators": [] }, { - "$id": "546", + "$id": "538", "Name": "input", "NameInRequest": "input", "Type": { @@ -5311,7 +5262,7 @@ ], "Responses": [ { - "$id": "547", + "$id": "539", "StatusCodes": [ 204 ], @@ -5335,33 +5286,33 @@ } ], "Protocol": { - "$id": "548" + "$id": "540" }, "Parent": "FirstTestTypeSpecClient", "Parameters": [ { - "$ref": "541" + "$ref": "533" } ], "Decorators": [] }, { - "$id": "549", + "$id": "541", "Name": "ProtocolAndConvenient", "Operations": [ { - "$id": "550", + "$id": "542", "Name": "internalProtocol", "ResourceName": "ProtocolAndConvenient", "Description": "When set protocol false and convenient true, then the protocol method should be internal", "Accessibility": "public", "Parameters": [ { - "$id": "551", + "$id": "543", "Name": "firstTestTypeSpecUrl", "NameInRequest": "firstTestTypeSpecUrl", "Type": { - "$id": "552", + "$id": "544", "Kind": "url", "Name": "url", "CrossLanguageDefinitionId": "TypeSpec.url" @@ -5377,15 +5328,15 @@ "Kind": "Client" }, { - "$id": "553", + "$id": "545", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "554", + "$id": "546", "Kind": "constant", "ValueType": { - "$id": "555", + "$id": "547", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -5404,14 +5355,14 @@ "Decorators": [] }, { - "$id": "556", + "$id": "548", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "557", + "$id": "549", "Kind": "constant", "ValueType": { - "$id": "558", + "$id": "550", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -5430,7 +5381,7 @@ "Decorators": [] }, { - "$id": "559", + "$id": "551", "Name": "body", "NameInRequest": "body", "Type": { @@ -5448,7 +5399,7 @@ ], "Responses": [ { - "$id": "560", + "$id": "552", "StatusCodes": [ 200 ], @@ -5477,19 +5428,19 @@ "Decorators": [] }, { - "$id": "561", + "$id": "553", "Name": "stillConvenient", "ResourceName": "ProtocolAndConvenient", "Description": "When set protocol false and convenient true, the convenient method should be generated even it has the same signature as protocol one", "Accessibility": "public", "Parameters": [ { - "$ref": "551" + "$ref": "543" } ], "Responses": [ { - "$id": "562", + "$id": "554", "StatusCodes": [ 204 ], @@ -5510,33 +5461,33 @@ } ], "Protocol": { - "$id": "563" + "$id": "555" }, "Parent": "FirstTestTypeSpecClient", "Parameters": [ { - "$ref": "551" + "$ref": "543" } ], "Decorators": [] }, { - "$id": "564", + "$id": "556", "Name": "Entity", "Operations": [ { - "$id": "565", + "$id": "557", "Name": "doSomething", "ResourceName": "Entity", "Description": "doSomething for entity", "Accessibility": "public", "Parameters": [ { - "$id": "566", + "$id": "558", "Name": "firstTestTypeSpecUrl", "NameInRequest": "firstTestTypeSpecUrl", "Type": { - "$id": "567", + "$id": "559", "Kind": "url", "Name": "url", "CrossLanguageDefinitionId": "TypeSpec.url" @@ -5552,11 +5503,11 @@ "Kind": "Client" }, { - "$id": "568", + "$id": "560", "Name": "p2", "NameInRequest": "p2", "Type": { - "$id": "569", + "$id": "561", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -5572,14 +5523,14 @@ "Decorators": [] }, { - "$id": "570", + "$id": "562", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "571", + "$id": "563", "Kind": "constant", "ValueType": { - "$id": "572", + "$id": "564", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -5600,7 +5551,7 @@ ], "Responses": [ { - "$id": "573", + "$id": "565", "StatusCodes": [ 200 ], @@ -5627,33 +5578,33 @@ } ], "Protocol": { - "$id": "574" + "$id": "566" }, "Parent": "FirstTestTypeSpecClient", "Parameters": [ { - "$ref": "566" + "$ref": "558" } ], "Decorators": [] }, { - "$id": "575", + "$id": "567", "Name": "Glossary", "Operations": [ { - "$id": "576", + "$id": "568", "Name": "doSomething", "ResourceName": "Glossary", "Description": "doSomething for glossary", "Accessibility": "public", "Parameters": [ { - "$id": "577", + "$id": "569", "Name": "firstTestTypeSpecUrl", "NameInRequest": "firstTestTypeSpecUrl", "Type": { - "$id": "578", + "$id": "570", "Kind": "url", "Name": "url", "CrossLanguageDefinitionId": "TypeSpec.url" @@ -5669,11 +5620,11 @@ "Kind": "Client" }, { - "$id": "579", + "$id": "571", "Name": "id", "NameInRequest": "id", "Type": { - "$id": "580", + "$id": "572", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -5689,11 +5640,11 @@ "Decorators": [] }, { - "$id": "581", + "$id": "573", "Name": "h1", "NameInRequest": "h1", "Type": { - "$id": "582", + "$id": "574", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -5709,14 +5660,14 @@ "Decorators": [] }, { - "$id": "583", + "$id": "575", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "584", + "$id": "576", "Kind": "constant", "ValueType": { - "$id": "585", + "$id": "577", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -5737,7 +5688,7 @@ ], "Responses": [ { - "$id": "586", + "$id": "578", "StatusCodes": [ 200 ], @@ -5764,27 +5715,27 @@ } ], "Protocol": { - "$id": "587" + "$id": "579" }, "Parent": "FirstTestTypeSpecClient", "Parameters": [ { - "$ref": "577" + "$ref": "569" } ], "Decorators": [] } ], "Auth": { - "$id": "588", + "$id": "580", "OAuth2": { - "$id": "589", + "$id": "581", "Scopes": [ "https://api.example.com/.default" ] }, "ApiKey": { - "$id": "590", + "$id": "582", "Name": "x-ms-api-key" } } diff --git a/test/TestProjects/FirstTest-TypeSpec/tspconfig.yaml b/test/TestProjects/FirstTest-TypeSpec/tspconfig.yaml index 6d56ba5d854..aec4739c25f 100644 --- a/test/TestProjects/FirstTest-TypeSpec/tspconfig.yaml +++ b/test/TestProjects/FirstTest-TypeSpec/tspconfig.yaml @@ -5,4 +5,3 @@ options: deserialize-null-collection-as-null-value: true head-as-boolean: true generate-test-project: true - examples-dir: "{project-root}/examples" From 8f08fa4d8cf416746622d1ddb42694838545813d Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Wed, 21 Aug 2024 15:39:40 +0800 Subject: [PATCH 25/27] fix some issues found in review --- .../TypeSpecInputOperationExampleConverter.cs | 2 -- .../TypeSpecInputParameterExampleConverter.cs | 2 -- .../TypeSpecInputTypeExampleConverter.cs | 14 ++++++++------ .../Common/Input/InputTypes/InputOperation.cs | 2 +- .../Serialization/TypeSpecSerialization.cs | 1 - .../Emitter.Csharp/src/options.ts | 1 - 6 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputOperationExampleConverter.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputOperationExampleConverter.cs index 5d3e9616c22..0aa05931e64 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputOperationExampleConverter.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputOperationExampleConverter.cs @@ -10,8 +10,6 @@ namespace AutoRest.CSharp.Common.Input.Examples { internal sealed class TypeSpecInputOperationExampleConverter : JsonConverter { - private const string KindPropertyName = "kind"; - private readonly TypeSpecReferenceHandler _referenceHandler; public TypeSpecInputOperationExampleConverter(TypeSpecReferenceHandler referenceHandler) diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputParameterExampleConverter.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputParameterExampleConverter.cs index 4cc693612c3..c08fde87834 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputParameterExampleConverter.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputParameterExampleConverter.cs @@ -9,8 +9,6 @@ namespace AutoRest.CSharp.Common.Input.Examples { internal sealed class TypeSpecInputParameterExampleConverter : JsonConverter { - private const string KindPropertyName = "kind"; - private readonly TypeSpecReferenceHandler _referenceHandler; public TypeSpecInputParameterExampleConverter(TypeSpecReferenceHandler referenceHandler) diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputTypeExampleConverter.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputTypeExampleConverter.cs index 1c71cb1fc7a..f36cab15c5b 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputTypeExampleConverter.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/Examples/Serialization/TypeSpecInputTypeExampleConverter.cs @@ -11,6 +11,8 @@ namespace AutoRest.CSharp.Common.Input.Examples internal sealed class TypeSpecInputTypeExampleConverter : JsonConverter { private const string KindPropertyName = "kind"; + private const string TypePropertyName = "type"; + private const string ValuePropertyName = "value"; private readonly TypeSpecReferenceHandler _referenceHandler; @@ -68,8 +70,8 @@ private InputExampleValue CreateArrayExample(ref Utf8JsonReader reader, string? while (reader.TokenType != JsonTokenType.EndObject) { var isKnownProperty = reader.TryReadReferenceId(ref isFirstProperty, ref id) - || reader.TryReadWithConverter("type", options, ref type) - || reader.TryReadWithConverter("value", options, ref value); + || reader.TryReadWithConverter(TypePropertyName, options, ref type) + || reader.TryReadWithConverter(ValuePropertyName, options, ref value); if (!isKnownProperty) { @@ -95,8 +97,8 @@ private InputExampleValue CreateObjectExample(ref Utf8JsonReader reader, string? while (reader.TokenType != JsonTokenType.EndObject) { var isKnownProperty = reader.TryReadReferenceId(ref isFirstProperty, ref id) - || reader.TryReadWithConverter("type", options, ref type) - || reader.TryReadWithConverter("value", options, ref value); + || reader.TryReadWithConverter(TypePropertyName, options, ref type) + || reader.TryReadWithConverter(ValuePropertyName, options, ref value); if (!isKnownProperty) { @@ -122,8 +124,8 @@ private InputExampleValue CreateOtherExample(ref Utf8JsonReader reader, string? while (reader.TokenType != JsonTokenType.EndObject) { var isKnownProperty = reader.TryReadReferenceId(ref isFirstProperty, ref id) - || reader.TryReadWithConverter("type", options, ref type) - || reader.TryReadWithConverter("value", options, ref rawValue); + || reader.TryReadWithConverter(TypePropertyName, options, ref type) + || reader.TryReadWithConverter(ValuePropertyName, options, ref rawValue); if (!isKnownProperty) { diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/InputOperation.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/InputOperation.cs index 2d32b4e973a..7ab8dc6f018 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/InputOperation.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/InputOperation.cs @@ -162,7 +162,7 @@ private IReadOnlyList EnsureExamples() public string? OperationType { get; } public string OperationId => ResourceName is null ? Name : $"{ResourceName}_{Name.FirstCharToUpperCase()}"; public IReadOnlyList Decorators { get; internal set; } = new List(); - //TODO: Remove this until the SDK nullable is enabled, traking in https://github.com/Azure/autorest.csharp/issues/4780 + //TODO: Remove this until the SDK nullable is enabled, tracking in https://github.com/Azure/autorest.csharp/issues/4780 internal string SpecName { get; init; } internal bool IsNameChanged { get; init; } diff --git a/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecSerialization.cs b/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecSerialization.cs index 77677041398..8f7a1c8d4d7 100644 --- a/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecSerialization.cs +++ b/src/AutoRest.CSharp/Common/Input/InputTypes/Serialization/TypeSpecSerialization.cs @@ -2,7 +2,6 @@ // Licensed under the MIT License. See License.txt in the project root for license information. using System; -using System.ComponentModel; using System.Text.Json; using System.Text.Json.Serialization; using AutoRest.CSharp.Common.Input.Examples; diff --git a/src/TypeSpec.Extension/Emitter.Csharp/src/options.ts b/src/TypeSpec.Extension/Emitter.Csharp/src/options.ts index ba1adfc9642..a37e7d3a6d4 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/src/options.ts +++ b/src/TypeSpec.Extension/Emitter.Csharp/src/options.ts @@ -10,7 +10,6 @@ import { dllFilePath } from "@autorest/csharp"; export interface AzureNetEmitterOptions extends NetEmitterOptions { csharpGeneratorPath?: string; "enable-internal-raw-data"?: boolean; - "generate-mock-examples"?: boolean; } export const AzureNetEmitterOptionsSchema: JSONSchemaType = From 2a838a257c419f847ec8ac2616399374f2c357b3 Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Wed, 21 Aug 2024 16:42:38 +0800 Subject: [PATCH 26/27] update the version --- package-lock.json | 10 +- samples/AnomalyDetector/tspCodeModel.json | 4162 +++++++++-------- .../Emitter.Csharp/package.json | 2 +- 3 files changed, 2102 insertions(+), 2072 deletions(-) diff --git a/package-lock.json b/package-lock.json index 361f22606da..e74177b387a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2233,8 +2233,8 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "0.1.9-alpha.20240820.33", - "resolved": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2Nzc0NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240820.33.tgz", + "version": "0.1.9-alpha.20240821.3", + "resolved": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2Nzk3MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240821.3.tgz", "dev": true, "dependencies": { "json-serialize-refs": "0.1.0-0" @@ -8122,7 +8122,7 @@ "license": "MIT", "dependencies": { "@autorest/csharp": "3.0.0-beta.20240625.4", - "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2Nzc0NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240820.33.tgz", + "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2Nzk3MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240821.3.tgz", "json-serialize-refs": "0.1.0-0" }, "devDependencies": { @@ -8475,7 +8475,7 @@ "@types/prettier": "^2.6.3", "@typespec/compiler": "0.59.0", "@typespec/http": "0.59.0", - "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2Nzc0NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240820.33.tgz", + "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2Nzk3MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240821.3.tgz", "@typespec/json-schema": "0.59.0", "@typespec/library-linter": "0.59.0", "@typespec/openapi": "0.59.0", @@ -9664,7 +9664,7 @@ "requires": {} }, "@typespec/http-client-csharp": { - "version": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2Nzc0NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240820.33.tgz", + "version": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2Nzk3MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240821.3.tgz", "dev": true, "requires": { "json-serialize-refs": "0.1.0-0" diff --git a/samples/AnomalyDetector/tspCodeModel.json b/samples/AnomalyDetector/tspCodeModel.json index e5e86a052c2..5716489515a 100644 --- a/samples/AnomalyDetector/tspCodeModel.json +++ b/samples/AnomalyDetector/tspCodeModel.json @@ -4692,12 +4692,15 @@ } } } - ] + ], + "responses": { + "$id": "582" + } } ] }, { - "$id": "582", + "$id": "583", "Name": "DetectUnivariateLastPoint", "ResourceName": "Univariate", "Summary": "Detect anomaly status of the latest point in time series.", @@ -4711,15 +4714,15 @@ "$ref": "316" }, { - "$id": "583", + "$id": "584", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "584", + "$id": "585", "Kind": "constant", "ValueType": { - "$id": "585", + "$id": "586", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4738,14 +4741,14 @@ "Decorators": [] }, { - "$id": "586", + "$id": "587", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "587", + "$id": "588", "Kind": "constant", "ValueType": { - "$id": "588", + "$id": "589", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -4764,7 +4767,7 @@ "Decorators": [] }, { - "$id": "589", + "$id": "590", "Name": "options", "NameInRequest": "options", "Description": "Method of univariate anomaly detection.", @@ -4783,7 +4786,7 @@ ], "Responses": [ { - "$id": "590", + "$id": "591", "StatusCodes": [ 200 ], @@ -4812,261 +4815,261 @@ "Decorators": [], "Examples": [ { - "$id": "591", + "$id": "592", "kind": "http", "name": "Detect univariate last point", "description": "Detect univariate last point", "filePath": "v1.1/LastDetect.json", "rawExample": { - "$id": "592", + "$id": "593", "operationId": "Univariate_DetectUnivariateLastPoint", "title": "Detect univariate last point", "parameters": { - "$id": "593", + "$id": "594", "Endpoint": "{Endpoint}", "ApiVersion": "v1.1", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "options": { - "$id": "594", + "$id": "595", "series": [ { - "$id": "595", + "$id": "596", "timestamp": "1972-01-01T00:00:00Z", "value": 826 }, { - "$id": "596", + "$id": "597", "timestamp": "1972-02-01T00:00:00Z", "value": 799 }, { - "$id": "597", + "$id": "598", "timestamp": "1972-03-01T00:00:00Z", "value": 890 }, { - "$id": "598", + "$id": "599", "timestamp": "1972-04-01T00:00:00Z", "value": 900 }, { - "$id": "599", + "$id": "600", "timestamp": "1972-05-01T00:00:00Z", "value": 961 }, { - "$id": "600", + "$id": "601", "timestamp": "1972-06-01T00:00:00Z", "value": 935 }, { - "$id": "601", + "$id": "602", "timestamp": "1972-07-01T00:00:00Z", "value": 894 }, { - "$id": "602", + "$id": "603", "timestamp": "1972-08-01T00:00:00Z", "value": 855 }, { - "$id": "603", + "$id": "604", "timestamp": "1972-09-01T00:00:00Z", "value": 809 }, { - "$id": "604", + "$id": "605", "timestamp": "1972-10-01T00:00:00Z", "value": 810 }, { - "$id": "605", + "$id": "606", "timestamp": "1972-11-01T00:00:00Z", "value": 766 }, { - "$id": "606", + "$id": "607", "timestamp": "1972-12-01T00:00:00Z", "value": 805 }, { - "$id": "607", + "$id": "608", "timestamp": "1973-01-01T00:00:00Z", "value": 821 }, { - "$id": "608", + "$id": "609", "timestamp": "1973-02-01T00:00:00Z", "value": 773 }, { - "$id": "609", + "$id": "610", "timestamp": "1973-03-01T00:00:00Z", "value": 883 }, { - "$id": "610", + "$id": "611", "timestamp": "1973-04-01T00:00:00Z", "value": 898 }, { - "$id": "611", + "$id": "612", "timestamp": "1973-05-01T00:00:00Z", "value": 957 }, { - "$id": "612", + "$id": "613", "timestamp": "1973-06-01T00:00:00Z", "value": 924 }, { - "$id": "613", + "$id": "614", "timestamp": "1973-07-01T00:00:00Z", "value": 881 }, { - "$id": "614", + "$id": "615", "timestamp": "1973-08-01T00:00:00Z", "value": 837 }, { - "$id": "615", + "$id": "616", "timestamp": "1973-09-01T00:00:00Z", "value": 784 }, { - "$id": "616", + "$id": "617", "timestamp": "1973-10-01T00:00:00Z", "value": 791 }, { - "$id": "617", + "$id": "618", "timestamp": "1973-11-01T00:00:00Z", "value": 760 }, { - "$id": "618", + "$id": "619", "timestamp": "1973-12-01T00:00:00Z", "value": 802 }, { - "$id": "619", + "$id": "620", "timestamp": "1974-01-01T00:00:00Z", "value": 828 }, { - "$id": "620", + "$id": "621", "timestamp": "1974-02-01T00:00:00Z", "value": 1030 }, { - "$id": "621", + "$id": "622", "timestamp": "1974-03-01T00:00:00Z", "value": 889 }, { - "$id": "622", + "$id": "623", "timestamp": "1974-04-01T00:00:00Z", "value": 902 }, { - "$id": "623", + "$id": "624", "timestamp": "1974-05-01T00:00:00Z", "value": 969 }, { - "$id": "624", + "$id": "625", "timestamp": "1974-06-01T00:00:00Z", "value": 947 }, { - "$id": "625", + "$id": "626", "timestamp": "1974-07-01T00:00:00Z", "value": 908 }, { - "$id": "626", + "$id": "627", "timestamp": "1974-08-01T00:00:00Z", "value": 867 }, { - "$id": "627", + "$id": "628", "timestamp": "1974-09-01T00:00:00Z", "value": 815 }, { - "$id": "628", + "$id": "629", "timestamp": "1974-10-01T00:00:00Z", "value": 812 }, { - "$id": "629", + "$id": "630", "timestamp": "1974-11-01T00:00:00Z", "value": 773 }, { - "$id": "630", + "$id": "631", "timestamp": "1974-12-01T00:00:00Z", "value": 813 }, { - "$id": "631", + "$id": "632", "timestamp": "1975-01-01T00:00:00Z", "value": 834 }, { - "$id": "632", + "$id": "633", "timestamp": "1975-02-01T00:00:00Z", "value": 782 }, { - "$id": "633", + "$id": "634", "timestamp": "1975-03-01T00:00:00Z", "value": 892 }, { - "$id": "634", + "$id": "635", "timestamp": "1975-04-01T00:00:00Z", "value": 903 }, { - "$id": "635", + "$id": "636", "timestamp": "1975-05-01T00:00:00Z", "value": 966 }, { - "$id": "636", + "$id": "637", "timestamp": "1975-06-01T00:00:00Z", "value": 937 }, { - "$id": "637", + "$id": "638", "timestamp": "1975-07-01T00:00:00Z", "value": 896 }, { - "$id": "638", + "$id": "639", "timestamp": "1975-08-01T00:00:00Z", "value": 858 }, { - "$id": "639", + "$id": "640", "timestamp": "1975-09-01T00:00:00Z", "value": 817 }, { - "$id": "640", + "$id": "641", "timestamp": "1975-10-01T00:00:00Z", "value": 827 }, { - "$id": "641", + "$id": "642", "timestamp": "1975-11-01T00:00:00Z", "value": 797 }, { - "$id": "642", + "$id": "643", "timestamp": "1975-12-01T00:00:00Z", "value": 843 } @@ -5080,9 +5083,9 @@ }, "responses": { "200": { - "$id": "644", + "$id": "645", "body": { - "$id": "645", + "$id": "646", "isAnomaly": false, "isPositiveAnomaly": false, "isNegativeAnomaly": false, @@ -5094,40 +5097,40 @@ "severity": 0 } }, - "$id": "643" + "$id": "644" } }, "parameters": [ { - "$id": "646", + "$id": "647", "parameter": { - "$ref": "589" + "$ref": "590" }, "value": { - "$id": "647", + "$id": "648", "kind": "model", "type": { "$ref": "216" }, "value": { - "$id": "648", + "$id": "649", "series": { - "$id": "649", + "$id": "650", "kind": "array", "type": { "$ref": "218" }, "value": [ { - "$id": "650", + "$id": "651", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "651", + "$id": "652", "timestamp": { - "$id": "652", + "$id": "653", "kind": "string", "type": { "$ref": "221" @@ -5135,7 +5138,7 @@ "value": "1972-01-01T00:00:00Z" }, "value": { - "$id": "653", + "$id": "654", "kind": "number", "type": { "$ref": "224" @@ -5145,15 +5148,15 @@ } }, { - "$id": "654", + "$id": "655", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "655", + "$id": "656", "timestamp": { - "$id": "656", + "$id": "657", "kind": "string", "type": { "$ref": "221" @@ -5161,7 +5164,7 @@ "value": "1972-02-01T00:00:00Z" }, "value": { - "$id": "657", + "$id": "658", "kind": "number", "type": { "$ref": "224" @@ -5171,15 +5174,15 @@ } }, { - "$id": "658", + "$id": "659", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "659", + "$id": "660", "timestamp": { - "$id": "660", + "$id": "661", "kind": "string", "type": { "$ref": "221" @@ -5187,7 +5190,7 @@ "value": "1972-03-01T00:00:00Z" }, "value": { - "$id": "661", + "$id": "662", "kind": "number", "type": { "$ref": "224" @@ -5197,15 +5200,15 @@ } }, { - "$id": "662", + "$id": "663", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "663", + "$id": "664", "timestamp": { - "$id": "664", + "$id": "665", "kind": "string", "type": { "$ref": "221" @@ -5213,7 +5216,7 @@ "value": "1972-04-01T00:00:00Z" }, "value": { - "$id": "665", + "$id": "666", "kind": "number", "type": { "$ref": "224" @@ -5223,15 +5226,15 @@ } }, { - "$id": "666", + "$id": "667", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "667", + "$id": "668", "timestamp": { - "$id": "668", + "$id": "669", "kind": "string", "type": { "$ref": "221" @@ -5239,7 +5242,7 @@ "value": "1972-05-01T00:00:00Z" }, "value": { - "$id": "669", + "$id": "670", "kind": "number", "type": { "$ref": "224" @@ -5249,15 +5252,15 @@ } }, { - "$id": "670", + "$id": "671", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "671", + "$id": "672", "timestamp": { - "$id": "672", + "$id": "673", "kind": "string", "type": { "$ref": "221" @@ -5265,7 +5268,7 @@ "value": "1972-06-01T00:00:00Z" }, "value": { - "$id": "673", + "$id": "674", "kind": "number", "type": { "$ref": "224" @@ -5275,15 +5278,15 @@ } }, { - "$id": "674", + "$id": "675", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "675", + "$id": "676", "timestamp": { - "$id": "676", + "$id": "677", "kind": "string", "type": { "$ref": "221" @@ -5291,7 +5294,7 @@ "value": "1972-07-01T00:00:00Z" }, "value": { - "$id": "677", + "$id": "678", "kind": "number", "type": { "$ref": "224" @@ -5301,15 +5304,15 @@ } }, { - "$id": "678", + "$id": "679", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "679", + "$id": "680", "timestamp": { - "$id": "680", + "$id": "681", "kind": "string", "type": { "$ref": "221" @@ -5317,7 +5320,7 @@ "value": "1972-08-01T00:00:00Z" }, "value": { - "$id": "681", + "$id": "682", "kind": "number", "type": { "$ref": "224" @@ -5327,15 +5330,15 @@ } }, { - "$id": "682", + "$id": "683", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "683", + "$id": "684", "timestamp": { - "$id": "684", + "$id": "685", "kind": "string", "type": { "$ref": "221" @@ -5343,7 +5346,7 @@ "value": "1972-09-01T00:00:00Z" }, "value": { - "$id": "685", + "$id": "686", "kind": "number", "type": { "$ref": "224" @@ -5353,15 +5356,15 @@ } }, { - "$id": "686", + "$id": "687", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "687", + "$id": "688", "timestamp": { - "$id": "688", + "$id": "689", "kind": "string", "type": { "$ref": "221" @@ -5369,7 +5372,7 @@ "value": "1972-10-01T00:00:00Z" }, "value": { - "$id": "689", + "$id": "690", "kind": "number", "type": { "$ref": "224" @@ -5379,15 +5382,15 @@ } }, { - "$id": "690", + "$id": "691", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "691", + "$id": "692", "timestamp": { - "$id": "692", + "$id": "693", "kind": "string", "type": { "$ref": "221" @@ -5395,7 +5398,7 @@ "value": "1972-11-01T00:00:00Z" }, "value": { - "$id": "693", + "$id": "694", "kind": "number", "type": { "$ref": "224" @@ -5405,15 +5408,15 @@ } }, { - "$id": "694", + "$id": "695", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "695", + "$id": "696", "timestamp": { - "$id": "696", + "$id": "697", "kind": "string", "type": { "$ref": "221" @@ -5421,7 +5424,7 @@ "value": "1972-12-01T00:00:00Z" }, "value": { - "$id": "697", + "$id": "698", "kind": "number", "type": { "$ref": "224" @@ -5431,15 +5434,15 @@ } }, { - "$id": "698", + "$id": "699", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "699", + "$id": "700", "timestamp": { - "$id": "700", + "$id": "701", "kind": "string", "type": { "$ref": "221" @@ -5447,7 +5450,7 @@ "value": "1973-01-01T00:00:00Z" }, "value": { - "$id": "701", + "$id": "702", "kind": "number", "type": { "$ref": "224" @@ -5457,15 +5460,15 @@ } }, { - "$id": "702", + "$id": "703", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "703", + "$id": "704", "timestamp": { - "$id": "704", + "$id": "705", "kind": "string", "type": { "$ref": "221" @@ -5473,7 +5476,7 @@ "value": "1973-02-01T00:00:00Z" }, "value": { - "$id": "705", + "$id": "706", "kind": "number", "type": { "$ref": "224" @@ -5483,15 +5486,15 @@ } }, { - "$id": "706", + "$id": "707", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "707", + "$id": "708", "timestamp": { - "$id": "708", + "$id": "709", "kind": "string", "type": { "$ref": "221" @@ -5499,7 +5502,7 @@ "value": "1973-03-01T00:00:00Z" }, "value": { - "$id": "709", + "$id": "710", "kind": "number", "type": { "$ref": "224" @@ -5509,15 +5512,15 @@ } }, { - "$id": "710", + "$id": "711", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "711", + "$id": "712", "timestamp": { - "$id": "712", + "$id": "713", "kind": "string", "type": { "$ref": "221" @@ -5525,7 +5528,7 @@ "value": "1973-04-01T00:00:00Z" }, "value": { - "$id": "713", + "$id": "714", "kind": "number", "type": { "$ref": "224" @@ -5535,15 +5538,15 @@ } }, { - "$id": "714", + "$id": "715", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "715", + "$id": "716", "timestamp": { - "$id": "716", + "$id": "717", "kind": "string", "type": { "$ref": "221" @@ -5551,7 +5554,7 @@ "value": "1973-05-01T00:00:00Z" }, "value": { - "$id": "717", + "$id": "718", "kind": "number", "type": { "$ref": "224" @@ -5561,15 +5564,15 @@ } }, { - "$id": "718", + "$id": "719", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "719", + "$id": "720", "timestamp": { - "$id": "720", + "$id": "721", "kind": "string", "type": { "$ref": "221" @@ -5577,7 +5580,7 @@ "value": "1973-06-01T00:00:00Z" }, "value": { - "$id": "721", + "$id": "722", "kind": "number", "type": { "$ref": "224" @@ -5587,15 +5590,15 @@ } }, { - "$id": "722", + "$id": "723", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "723", + "$id": "724", "timestamp": { - "$id": "724", + "$id": "725", "kind": "string", "type": { "$ref": "221" @@ -5603,7 +5606,7 @@ "value": "1973-07-01T00:00:00Z" }, "value": { - "$id": "725", + "$id": "726", "kind": "number", "type": { "$ref": "224" @@ -5613,15 +5616,15 @@ } }, { - "$id": "726", + "$id": "727", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "727", + "$id": "728", "timestamp": { - "$id": "728", + "$id": "729", "kind": "string", "type": { "$ref": "221" @@ -5629,7 +5632,7 @@ "value": "1973-08-01T00:00:00Z" }, "value": { - "$id": "729", + "$id": "730", "kind": "number", "type": { "$ref": "224" @@ -5639,15 +5642,15 @@ } }, { - "$id": "730", + "$id": "731", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "731", + "$id": "732", "timestamp": { - "$id": "732", + "$id": "733", "kind": "string", "type": { "$ref": "221" @@ -5655,7 +5658,7 @@ "value": "1973-09-01T00:00:00Z" }, "value": { - "$id": "733", + "$id": "734", "kind": "number", "type": { "$ref": "224" @@ -5665,15 +5668,15 @@ } }, { - "$id": "734", + "$id": "735", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "735", + "$id": "736", "timestamp": { - "$id": "736", + "$id": "737", "kind": "string", "type": { "$ref": "221" @@ -5681,7 +5684,7 @@ "value": "1973-10-01T00:00:00Z" }, "value": { - "$id": "737", + "$id": "738", "kind": "number", "type": { "$ref": "224" @@ -5691,15 +5694,15 @@ } }, { - "$id": "738", + "$id": "739", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "739", + "$id": "740", "timestamp": { - "$id": "740", + "$id": "741", "kind": "string", "type": { "$ref": "221" @@ -5707,7 +5710,7 @@ "value": "1973-11-01T00:00:00Z" }, "value": { - "$id": "741", + "$id": "742", "kind": "number", "type": { "$ref": "224" @@ -5717,15 +5720,15 @@ } }, { - "$id": "742", + "$id": "743", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "743", + "$id": "744", "timestamp": { - "$id": "744", + "$id": "745", "kind": "string", "type": { "$ref": "221" @@ -5733,7 +5736,7 @@ "value": "1973-12-01T00:00:00Z" }, "value": { - "$id": "745", + "$id": "746", "kind": "number", "type": { "$ref": "224" @@ -5743,15 +5746,15 @@ } }, { - "$id": "746", + "$id": "747", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "747", + "$id": "748", "timestamp": { - "$id": "748", + "$id": "749", "kind": "string", "type": { "$ref": "221" @@ -5759,7 +5762,7 @@ "value": "1974-01-01T00:00:00Z" }, "value": { - "$id": "749", + "$id": "750", "kind": "number", "type": { "$ref": "224" @@ -5769,15 +5772,15 @@ } }, { - "$id": "750", + "$id": "751", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "751", + "$id": "752", "timestamp": { - "$id": "752", + "$id": "753", "kind": "string", "type": { "$ref": "221" @@ -5785,7 +5788,7 @@ "value": "1974-02-01T00:00:00Z" }, "value": { - "$id": "753", + "$id": "754", "kind": "number", "type": { "$ref": "224" @@ -5795,15 +5798,15 @@ } }, { - "$id": "754", + "$id": "755", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "755", + "$id": "756", "timestamp": { - "$id": "756", + "$id": "757", "kind": "string", "type": { "$ref": "221" @@ -5811,7 +5814,7 @@ "value": "1974-03-01T00:00:00Z" }, "value": { - "$id": "757", + "$id": "758", "kind": "number", "type": { "$ref": "224" @@ -5821,15 +5824,15 @@ } }, { - "$id": "758", + "$id": "759", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "759", + "$id": "760", "timestamp": { - "$id": "760", + "$id": "761", "kind": "string", "type": { "$ref": "221" @@ -5837,7 +5840,7 @@ "value": "1974-04-01T00:00:00Z" }, "value": { - "$id": "761", + "$id": "762", "kind": "number", "type": { "$ref": "224" @@ -5847,15 +5850,15 @@ } }, { - "$id": "762", + "$id": "763", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "763", + "$id": "764", "timestamp": { - "$id": "764", + "$id": "765", "kind": "string", "type": { "$ref": "221" @@ -5863,7 +5866,7 @@ "value": "1974-05-01T00:00:00Z" }, "value": { - "$id": "765", + "$id": "766", "kind": "number", "type": { "$ref": "224" @@ -5873,15 +5876,15 @@ } }, { - "$id": "766", + "$id": "767", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "767", + "$id": "768", "timestamp": { - "$id": "768", + "$id": "769", "kind": "string", "type": { "$ref": "221" @@ -5889,7 +5892,7 @@ "value": "1974-06-01T00:00:00Z" }, "value": { - "$id": "769", + "$id": "770", "kind": "number", "type": { "$ref": "224" @@ -5899,15 +5902,15 @@ } }, { - "$id": "770", + "$id": "771", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "771", + "$id": "772", "timestamp": { - "$id": "772", + "$id": "773", "kind": "string", "type": { "$ref": "221" @@ -5915,7 +5918,7 @@ "value": "1974-07-01T00:00:00Z" }, "value": { - "$id": "773", + "$id": "774", "kind": "number", "type": { "$ref": "224" @@ -5925,15 +5928,15 @@ } }, { - "$id": "774", + "$id": "775", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "775", + "$id": "776", "timestamp": { - "$id": "776", + "$id": "777", "kind": "string", "type": { "$ref": "221" @@ -5941,7 +5944,7 @@ "value": "1974-08-01T00:00:00Z" }, "value": { - "$id": "777", + "$id": "778", "kind": "number", "type": { "$ref": "224" @@ -5951,15 +5954,15 @@ } }, { - "$id": "778", + "$id": "779", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "779", + "$id": "780", "timestamp": { - "$id": "780", + "$id": "781", "kind": "string", "type": { "$ref": "221" @@ -5967,7 +5970,7 @@ "value": "1974-09-01T00:00:00Z" }, "value": { - "$id": "781", + "$id": "782", "kind": "number", "type": { "$ref": "224" @@ -5977,15 +5980,15 @@ } }, { - "$id": "782", + "$id": "783", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "783", + "$id": "784", "timestamp": { - "$id": "784", + "$id": "785", "kind": "string", "type": { "$ref": "221" @@ -5993,7 +5996,7 @@ "value": "1974-10-01T00:00:00Z" }, "value": { - "$id": "785", + "$id": "786", "kind": "number", "type": { "$ref": "224" @@ -6003,15 +6006,15 @@ } }, { - "$id": "786", + "$id": "787", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "787", + "$id": "788", "timestamp": { - "$id": "788", + "$id": "789", "kind": "string", "type": { "$ref": "221" @@ -6019,7 +6022,7 @@ "value": "1974-11-01T00:00:00Z" }, "value": { - "$id": "789", + "$id": "790", "kind": "number", "type": { "$ref": "224" @@ -6029,15 +6032,15 @@ } }, { - "$id": "790", + "$id": "791", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "791", + "$id": "792", "timestamp": { - "$id": "792", + "$id": "793", "kind": "string", "type": { "$ref": "221" @@ -6045,7 +6048,7 @@ "value": "1974-12-01T00:00:00Z" }, "value": { - "$id": "793", + "$id": "794", "kind": "number", "type": { "$ref": "224" @@ -6055,15 +6058,15 @@ } }, { - "$id": "794", + "$id": "795", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "795", + "$id": "796", "timestamp": { - "$id": "796", + "$id": "797", "kind": "string", "type": { "$ref": "221" @@ -6071,7 +6074,7 @@ "value": "1975-01-01T00:00:00Z" }, "value": { - "$id": "797", + "$id": "798", "kind": "number", "type": { "$ref": "224" @@ -6081,15 +6084,15 @@ } }, { - "$id": "798", + "$id": "799", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "799", + "$id": "800", "timestamp": { - "$id": "800", + "$id": "801", "kind": "string", "type": { "$ref": "221" @@ -6097,7 +6100,7 @@ "value": "1975-02-01T00:00:00Z" }, "value": { - "$id": "801", + "$id": "802", "kind": "number", "type": { "$ref": "224" @@ -6107,15 +6110,15 @@ } }, { - "$id": "802", + "$id": "803", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "803", + "$id": "804", "timestamp": { - "$id": "804", + "$id": "805", "kind": "string", "type": { "$ref": "221" @@ -6123,7 +6126,7 @@ "value": "1975-03-01T00:00:00Z" }, "value": { - "$id": "805", + "$id": "806", "kind": "number", "type": { "$ref": "224" @@ -6133,15 +6136,15 @@ } }, { - "$id": "806", + "$id": "807", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "807", + "$id": "808", "timestamp": { - "$id": "808", + "$id": "809", "kind": "string", "type": { "$ref": "221" @@ -6149,7 +6152,7 @@ "value": "1975-04-01T00:00:00Z" }, "value": { - "$id": "809", + "$id": "810", "kind": "number", "type": { "$ref": "224" @@ -6159,15 +6162,15 @@ } }, { - "$id": "810", + "$id": "811", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "811", + "$id": "812", "timestamp": { - "$id": "812", + "$id": "813", "kind": "string", "type": { "$ref": "221" @@ -6175,7 +6178,7 @@ "value": "1975-05-01T00:00:00Z" }, "value": { - "$id": "813", + "$id": "814", "kind": "number", "type": { "$ref": "224" @@ -6185,15 +6188,15 @@ } }, { - "$id": "814", + "$id": "815", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "815", + "$id": "816", "timestamp": { - "$id": "816", + "$id": "817", "kind": "string", "type": { "$ref": "221" @@ -6201,7 +6204,7 @@ "value": "1975-06-01T00:00:00Z" }, "value": { - "$id": "817", + "$id": "818", "kind": "number", "type": { "$ref": "224" @@ -6211,15 +6214,15 @@ } }, { - "$id": "818", + "$id": "819", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "819", + "$id": "820", "timestamp": { - "$id": "820", + "$id": "821", "kind": "string", "type": { "$ref": "221" @@ -6227,7 +6230,7 @@ "value": "1975-07-01T00:00:00Z" }, "value": { - "$id": "821", + "$id": "822", "kind": "number", "type": { "$ref": "224" @@ -6237,15 +6240,15 @@ } }, { - "$id": "822", + "$id": "823", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "823", + "$id": "824", "timestamp": { - "$id": "824", + "$id": "825", "kind": "string", "type": { "$ref": "221" @@ -6253,7 +6256,7 @@ "value": "1975-08-01T00:00:00Z" }, "value": { - "$id": "825", + "$id": "826", "kind": "number", "type": { "$ref": "224" @@ -6263,15 +6266,15 @@ } }, { - "$id": "826", + "$id": "827", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "827", + "$id": "828", "timestamp": { - "$id": "828", + "$id": "829", "kind": "string", "type": { "$ref": "221" @@ -6279,7 +6282,7 @@ "value": "1975-09-01T00:00:00Z" }, "value": { - "$id": "829", + "$id": "830", "kind": "number", "type": { "$ref": "224" @@ -6289,15 +6292,15 @@ } }, { - "$id": "830", + "$id": "831", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "831", + "$id": "832", "timestamp": { - "$id": "832", + "$id": "833", "kind": "string", "type": { "$ref": "221" @@ -6305,7 +6308,7 @@ "value": "1975-10-01T00:00:00Z" }, "value": { - "$id": "833", + "$id": "834", "kind": "number", "type": { "$ref": "224" @@ -6315,15 +6318,15 @@ } }, { - "$id": "834", + "$id": "835", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "835", + "$id": "836", "timestamp": { - "$id": "836", + "$id": "837", "kind": "string", "type": { "$ref": "221" @@ -6331,7 +6334,7 @@ "value": "1975-11-01T00:00:00Z" }, "value": { - "$id": "837", + "$id": "838", "kind": "number", "type": { "$ref": "224" @@ -6341,15 +6344,15 @@ } }, { - "$id": "838", + "$id": "839", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "839", + "$id": "840", "timestamp": { - "$id": "840", + "$id": "841", "kind": "string", "type": { "$ref": "221" @@ -6357,7 +6360,7 @@ "value": "1975-12-01T00:00:00Z" }, "value": { - "$id": "841", + "$id": "842", "kind": "number", "type": { "$ref": "224" @@ -6369,7 +6372,7 @@ ] }, "maxAnomalyRatio": { - "$id": "842", + "$id": "843", "kind": "number", "type": { "$ref": "231" @@ -6377,7 +6380,7 @@ "value": 0.25 }, "sensitivity": { - "$id": "843", + "$id": "844", "kind": "number", "type": { "$ref": "233" @@ -6385,7 +6388,7 @@ "value": 95 }, "granularity": { - "$id": "844", + "$id": "845", "kind": "string", "type": { "$ref": "29" @@ -6393,7 +6396,7 @@ "value": "monthly" }, "imputeMode": { - "$id": "845", + "$id": "846", "kind": "string", "type": { "$ref": "40" @@ -6401,7 +6404,7 @@ "value": "fixed" }, "imputeFixedValue": { - "$id": "846", + "$id": "847", "kind": "number", "type": { "$ref": "236" @@ -6411,12 +6414,15 @@ } } } - ] + ], + "responses": { + "$id": "848" + } } ] }, { - "$id": "847", + "$id": "849", "Name": "DetectUnivariateChangePoint", "ResourceName": "Univariate", "Summary": "Detect change point for the entire series", @@ -6430,15 +6436,15 @@ "$ref": "316" }, { - "$id": "848", + "$id": "850", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "849", + "$id": "851", "Kind": "constant", "ValueType": { - "$id": "850", + "$id": "852", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -6457,14 +6463,14 @@ "Decorators": [] }, { - "$id": "851", + "$id": "853", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "852", + "$id": "854", "Kind": "constant", "ValueType": { - "$id": "853", + "$id": "855", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -6483,7 +6489,7 @@ "Decorators": [] }, { - "$id": "854", + "$id": "856", "Name": "options", "NameInRequest": "options", "Description": "Method of univariate anomaly detection.", @@ -6502,7 +6508,7 @@ ], "Responses": [ { - "$id": "855", + "$id": "857", "StatusCodes": [ 200 ], @@ -6531,1306 +6537,1306 @@ "Decorators": [], "Examples": [ { - "$id": "856", + "$id": "858", "kind": "http", "name": "Univariate detection of a change point", "description": "Univariate detection of a change point", "filePath": "v1.1/ChangePointDetect.json", "rawExample": { - "$id": "857", + "$id": "859", "operationId": "Univariate_DetectUnivariateChangePoint", "title": "Univariate detection of a change point", "parameters": { - "$id": "858", + "$id": "860", "Endpoint": "{Endpoint}", "ApiVersion": "v1.1", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "options": { - "$id": "859", + "$id": "861", "series": [ { - "$id": "860", + "$id": "862", "timestamp": "2017-01-01T06:45:00Z", "value": 1639196 }, { - "$id": "861", + "$id": "863", "timestamp": "2017-01-01T06:50:00Z", "value": 1639290 }, { - "$id": "862", + "$id": "864", "timestamp": "2017-01-01T06:55:00Z", "value": 1667293 }, { - "$id": "863", + "$id": "865", "timestamp": "2017-01-01T07:00:00Z", "value": 1703130 }, { - "$id": "864", + "$id": "866", "timestamp": "2017-01-01T07:05:00Z", "value": 1650912 }, { - "$id": "865", + "$id": "867", "timestamp": "2017-01-01T07:10:00Z", "value": 1653596 }, { - "$id": "866", + "$id": "868", "timestamp": "2017-01-01T07:15:00Z", "value": 1653793 }, { - "$id": "867", + "$id": "869", "timestamp": "2017-01-01T07:20:00Z", "value": 1653795 }, { - "$id": "868", + "$id": "870", "timestamp": "2017-01-01T07:25:00Z", "value": 1663471 }, { - "$id": "869", + "$id": "871", "timestamp": "2017-01-01T07:30:00Z", "value": 1662358 }, { - "$id": "870", + "$id": "872", "timestamp": "2017-01-01T07:35:00Z", "value": 1664320 }, { - "$id": "871", + "$id": "873", "timestamp": "2017-01-01T07:40:00Z", "value": 1664942 }, { - "$id": "872", + "$id": "874", "timestamp": "2017-01-01T07:45:00Z", "value": 1664966 }, { - "$id": "873", + "$id": "875", "timestamp": "2017-01-01T07:50:00Z", "value": 1724271 }, { - "$id": "874", + "$id": "876", "timestamp": "2017-01-01T07:55:00Z", "value": 1678720 }, { - "$id": "875", + "$id": "877", "timestamp": "2017-01-01T08:00:00Z", "value": 1672536 }, { - "$id": "876", + "$id": "878", "timestamp": "2017-01-01T08:05:00Z", "value": 1672544 }, { - "$id": "877", + "$id": "879", "timestamp": "2017-01-01T08:10:00Z", "value": 1672364 }, { - "$id": "878", + "$id": "880", "timestamp": "2017-01-01T08:15:00Z", "value": 1672912 }, { - "$id": "879", + "$id": "881", "timestamp": "2017-01-01T08:20:00Z", "value": 1672736 }, { - "$id": "880", + "$id": "882", "timestamp": "2017-01-01T08:25:00Z", "value": 1672725 }, { - "$id": "881", + "$id": "883", "timestamp": "2017-01-01T08:30:00Z", "value": 1673247 }, { - "$id": "882", + "$id": "884", "timestamp": "2017-01-01T08:35:00Z", "value": 1673109 }, { - "$id": "883", + "$id": "885", "timestamp": "2017-01-01T08:40:00Z", "value": 1690088 }, { - "$id": "884", + "$id": "886", "timestamp": "2017-01-01T08:45:00Z", "value": 1703865 }, { - "$id": "885", + "$id": "887", "timestamp": "2017-01-01T08:50:00Z", "value": 1703865 }, { - "$id": "886", + "$id": "888", "timestamp": "2017-01-01T08:55:00Z", "value": 1786581 }, { - "$id": "887", + "$id": "889", "timestamp": "2017-01-01T09:00:00Z", "value": 1800945 }, { - "$id": "888", + "$id": "890", "timestamp": "2017-01-01T09:05:00Z", "value": 1800957 }, { - "$id": "889", + "$id": "891", "timestamp": "2017-01-01T09:10:00Z", "value": 1801191 }, { - "$id": "890", + "$id": "892", "timestamp": "2017-01-01T09:15:00Z", "value": 1801412 }, { - "$id": "891", + "$id": "893", "timestamp": "2017-01-01T09:20:00Z", "value": 1801621 }, { - "$id": "892", + "$id": "894", "timestamp": "2017-01-01T09:25:00Z", "value": 1801621 }, { - "$id": "893", + "$id": "895", "timestamp": "2017-01-01T09:30:00Z", "value": 1801654 }, { - "$id": "894", + "$id": "896", "timestamp": "2017-01-01T09:35:00Z", "value": 1802105 }, { - "$id": "895", + "$id": "897", "timestamp": "2017-01-01T09:40:00Z", "value": 1801800 }, { - "$id": "896", + "$id": "898", "timestamp": "2017-01-01T09:45:00Z", "value": 1803040 }, { - "$id": "897", + "$id": "899", "timestamp": "2017-01-01T09:50:00Z", "value": 1803672 }, { - "$id": "898", + "$id": "900", "timestamp": "2017-01-01T09:55:00Z", "value": 1803535 }, { - "$id": "899", + "$id": "901", "timestamp": "2017-01-01T10:00:00Z", "value": 1803541 }, { - "$id": "900", + "$id": "902", "timestamp": "2017-01-01T10:05:00Z", "value": 1803545 }, { - "$id": "901", + "$id": "903", "timestamp": "2017-01-01T10:10:00Z", "value": 1803599 }, { - "$id": "902", + "$id": "904", "timestamp": "2017-01-01T10:15:00Z", "value": 1803616 }, { - "$id": "903", + "$id": "905", "timestamp": "2017-01-01T10:20:00Z", "value": 1803619 }, { - "$id": "904", + "$id": "906", "timestamp": "2017-01-01T10:25:00Z", "value": 1809942 }, { - "$id": "905", + "$id": "907", "timestamp": "2017-01-01T10:30:00Z", "value": 1802720 }, { - "$id": "906", + "$id": "908", "timestamp": "2017-01-01T10:35:00Z", "value": 1802720 }, { - "$id": "907", + "$id": "909", "timestamp": "2017-01-01T10:40:00Z", "value": 1802888 }, { - "$id": "908", + "$id": "910", "timestamp": "2017-01-01T10:45:00Z", "value": 1809574 }, { - "$id": "909", + "$id": "911", "timestamp": "2017-01-01T10:50:00Z", "value": 1803896 }, { - "$id": "910", + "$id": "912", "timestamp": "2017-01-01T10:55:00Z", "value": 1803850 }, { - "$id": "911", + "$id": "913", "timestamp": "2017-01-01T11:00:00Z", "value": 1803854 }, { - "$id": "912", + "$id": "914", "timestamp": "2017-01-01T11:05:00Z", "value": 1803854 }, { - "$id": "913", + "$id": "915", "timestamp": "2017-01-01T11:10:00Z", "value": 1803797 }, { - "$id": "914", + "$id": "916", "timestamp": "2017-01-01T11:15:00Z", "value": 1803921 }, { - "$id": "915", + "$id": "917", "timestamp": "2017-01-01T11:20:00Z", "value": 1803933 }, { - "$id": "916", + "$id": "918", "timestamp": "2017-01-01T11:25:00Z", "value": 1804040 }, { - "$id": "917", + "$id": "919", "timestamp": "2017-01-01T11:30:00Z", "value": 1804044 }, { - "$id": "918", + "$id": "920", "timestamp": "2017-01-01T11:35:00Z", "value": 1804070 }, { - "$id": "919", + "$id": "921", "timestamp": "2017-01-01T11:40:00Z", "value": 1804070 }, { - "$id": "920", + "$id": "922", "timestamp": "2017-01-01T11:45:00Z", "value": 1804068 }, { - "$id": "921", + "$id": "923", "timestamp": "2017-01-01T11:50:00Z", "value": 1804073 }, { - "$id": "922", + "$id": "924", "timestamp": "2017-01-01T11:55:00Z", "value": 1804101 }, { - "$id": "923", + "$id": "925", "timestamp": "2017-01-01T12:00:00Z", "value": 1804674 }, { - "$id": "924", + "$id": "926", "timestamp": "2017-01-01T12:05:00Z", "value": 1804714 }, { - "$id": "925", + "$id": "927", "timestamp": "2017-01-01T12:10:00Z", "value": 1804730 }, { - "$id": "926", + "$id": "928", "timestamp": "2017-01-01T12:15:00Z", "value": 1804816 }, { - "$id": "927", + "$id": "929", "timestamp": "2017-01-01T12:20:00Z", "value": 1803996 }, { - "$id": "928", + "$id": "930", "timestamp": "2017-01-01T12:25:00Z", "value": 1803998 }, { - "$id": "929", + "$id": "931", "timestamp": "2017-01-01T12:30:00Z", "value": 1804015 }, { - "$id": "930", + "$id": "932", "timestamp": "2017-01-01T12:35:00Z", "value": 1804047 }, { - "$id": "931", + "$id": "933", "timestamp": "2017-01-01T12:40:00Z", "value": 1804050 }, { - "$id": "932", + "$id": "934", "timestamp": "2017-01-01T12:45:00Z", "value": 1804218 }, { - "$id": "933", + "$id": "935", "timestamp": "2017-01-01T12:50:00Z", "value": 1804217 }, { - "$id": "934", + "$id": "936", "timestamp": "2017-01-01T12:55:00Z", "value": 1804217 }, { - "$id": "935", + "$id": "937", "timestamp": "2017-01-01T13:00:00Z", "value": 1804205 }, { - "$id": "936", + "$id": "938", "timestamp": "2017-01-01T13:05:00Z", "value": 1804728 }, { - "$id": "937", + "$id": "939", "timestamp": "2017-01-01T13:10:00Z", "value": 1804748 }, { - "$id": "938", + "$id": "940", "timestamp": "2017-01-01T13:15:00Z", "value": 1805232 }, { - "$id": "939", + "$id": "941", "timestamp": "2017-01-01T13:20:00Z", "value": 1814121 }, { - "$id": "940", + "$id": "942", "timestamp": "2017-01-01T13:25:00Z", "value": 1806789 }, { - "$id": "941", + "$id": "943", "timestamp": "2017-01-01T13:30:00Z", "value": 1806119 }, { - "$id": "942", + "$id": "944", "timestamp": "2017-01-01T13:35:00Z", "value": 1806329 }, { - "$id": "943", + "$id": "945", "timestamp": "2017-01-01T13:40:00Z", "value": 1806454 }, { - "$id": "944", + "$id": "946", "timestamp": "2017-01-01T13:45:00Z", "value": 1806852 }, { - "$id": "945", + "$id": "947", "timestamp": "2017-01-01T13:50:00Z", "value": 1807347 }, { - "$id": "946", + "$id": "948", "timestamp": "2017-01-01T13:55:00Z", "value": 1812144 }, { - "$id": "947", + "$id": "949", "timestamp": "2017-01-01T14:00:00Z", "value": 1807418 }, { - "$id": "948", + "$id": "950", "timestamp": "2017-01-01T14:05:00Z", "value": 1807418 }, { - "$id": "949", + "$id": "951", "timestamp": "2017-01-01T14:10:00Z", "value": 1807432 }, { - "$id": "950", + "$id": "952", "timestamp": "2017-01-01T14:15:00Z", "value": 1808540 }, { - "$id": "951", + "$id": "953", "timestamp": "2017-01-01T14:20:00Z", "value": 1808541 }, { - "$id": "952", + "$id": "954", "timestamp": "2017-01-01T14:25:00Z", "value": 1807831 }, { - "$id": "953", + "$id": "955", "timestamp": "2017-01-01T14:30:00Z", "value": 1807852 }, { - "$id": "954", + "$id": "956", "timestamp": "2017-01-01T14:35:00Z", "value": 1807811 }, { - "$id": "955", + "$id": "957", "timestamp": "2017-01-01T14:40:00Z", "value": 2214285 }, { - "$id": "956", + "$id": "958", "timestamp": "2017-01-01T14:45:00Z", "value": 2215019 }, { - "$id": "957", + "$id": "959", "timestamp": "2017-01-01T14:50:00Z", "value": 2215329 }, { - "$id": "958", + "$id": "960", "timestamp": "2017-01-01T14:55:00Z", "value": 2215097 }, { - "$id": "959", + "$id": "961", "timestamp": "2017-01-01T15:00:00Z", "value": 2215129 }, { - "$id": "960", + "$id": "962", "timestamp": "2017-01-01T15:05:00Z", "value": 2215120 }, { - "$id": "961", + "$id": "963", "timestamp": "2017-01-01T15:10:00Z", "value": 2217056 }, { - "$id": "962", + "$id": "964", "timestamp": "2017-01-01T15:15:00Z", "value": 2217056 }, { - "$id": "963", + "$id": "965", "timestamp": "2017-01-01T15:20:00Z", "value": 2222126 }, { - "$id": "964", + "$id": "966", "timestamp": "2017-01-01T15:25:00Z", "value": 2226472 }, { - "$id": "965", + "$id": "967", "timestamp": "2017-01-01T15:30:00Z", "value": 2226722 }, { - "$id": "966", + "$id": "968", "timestamp": "2017-01-01T15:35:00Z", "value": 2226729 }, { - "$id": "967", + "$id": "969", "timestamp": "2017-01-01T15:40:00Z", "value": 2226735 }, { - "$id": "968", + "$id": "970", "timestamp": "2017-01-01T15:45:00Z", "value": 2226735 }, { - "$id": "969", + "$id": "971", "timestamp": "2017-01-01T15:50:00Z", "value": 2226735 }, { - "$id": "970", + "$id": "972", "timestamp": "2017-01-01T15:55:00Z", "value": 2226952 }, { - "$id": "971", + "$id": "973", "timestamp": "2017-01-01T16:00:00Z", "value": 2226962 }, { - "$id": "972", + "$id": "974", "timestamp": "2017-01-01T16:05:00Z", "value": 2649337 }, { - "$id": "973", + "$id": "975", "timestamp": "2017-01-01T16:10:00Z", "value": 2092796 }, { - "$id": "974", + "$id": "976", "timestamp": "2017-01-01T16:15:00Z", "value": 2092839 }, { - "$id": "975", + "$id": "977", "timestamp": "2017-01-01T16:20:00Z", "value": 2092940 }, { - "$id": "976", + "$id": "978", "timestamp": "2017-01-01T16:25:00Z", "value": 2092940 }, { - "$id": "977", + "$id": "979", "timestamp": "2017-01-01T16:30:00Z", "value": 2092965 }, { - "$id": "978", + "$id": "980", "timestamp": "2017-01-01T16:35:00Z", "value": 2092979 }, { - "$id": "979", + "$id": "981", "timestamp": "2017-01-01T16:40:00Z", "value": 2095588 }, { - "$id": "980", + "$id": "982", "timestamp": "2017-01-01T16:45:00Z", "value": 2099586 }, { - "$id": "981", + "$id": "983", "timestamp": "2017-01-01T16:50:00Z", "value": 2102981 }, { - "$id": "982", + "$id": "984", "timestamp": "2017-01-01T16:55:00Z", "value": 2108053 }, { - "$id": "983", + "$id": "985", "timestamp": "2017-01-01T17:00:00Z", "value": 2107907 }, { - "$id": "984", + "$id": "986", "timestamp": "2017-01-01T17:05:00Z", "value": 2108241 }, { - "$id": "985", + "$id": "987", "timestamp": "2017-01-01T17:10:00Z", "value": 2100321 }, { - "$id": "986", + "$id": "988", "timestamp": "2017-01-01T17:15:00Z", "value": 2100448 }, { - "$id": "987", + "$id": "989", "timestamp": "2017-01-01T17:20:00Z", "value": 2100483 }, { - "$id": "988", + "$id": "990", "timestamp": "2017-01-01T17:25:00Z", "value": 2103042 }, { - "$id": "989", + "$id": "991", "timestamp": "2017-01-01T17:30:00Z", "value": 2103037 }, { - "$id": "990", + "$id": "992", "timestamp": "2017-01-01T17:35:00Z", "value": 2103040 }, { - "$id": "991", + "$id": "993", "timestamp": "2017-01-01T17:40:00Z", "value": 2103054 }, { - "$id": "992", + "$id": "994", "timestamp": "2017-01-01T17:45:00Z", "value": 2103058 }, { - "$id": "993", + "$id": "995", "timestamp": "2017-01-01T17:50:00Z", "value": 1830757 }, { - "$id": "994", + "$id": "996", "timestamp": "2017-01-01T17:55:00Z", "value": 1830855 }, { - "$id": "995", + "$id": "997", "timestamp": "2017-01-01T18:00:00Z", "value": 1831495 }, { - "$id": "996", + "$id": "998", "timestamp": "2017-01-01T18:05:00Z", "value": 1831463 }, { - "$id": "997", + "$id": "999", "timestamp": "2017-01-01T18:10:00Z", "value": 1831963 }, { - "$id": "998", + "$id": "1000", "timestamp": "2017-01-01T18:15:00Z", "value": 1832046 }, { - "$id": "999", + "$id": "1001", "timestamp": "2017-01-01T18:20:00Z", "value": 1832070 }, { - "$id": "1000", + "$id": "1002", "timestamp": "2017-01-01T18:25:00Z", "value": 1835511 }, { - "$id": "1001", + "$id": "1003", "timestamp": "2017-01-01T18:30:00Z", "value": 1835265 }, { - "$id": "1002", + "$id": "1004", "timestamp": "2017-01-01T18:35:00Z", "value": 1835481 }, { - "$id": "1003", + "$id": "1005", "timestamp": "2017-01-01T18:40:00Z", "value": 1835578 }, { - "$id": "1004", + "$id": "1006", "timestamp": "2017-01-01T18:45:00Z", "value": 1835611 }, { - "$id": "1005", + "$id": "1007", "timestamp": "2017-01-01T18:50:00Z", "value": 1836314 }, { - "$id": "1006", + "$id": "1008", "timestamp": "2017-01-01T18:55:00Z", "value": 1836369 }, { - "$id": "1007", + "$id": "1009", "timestamp": "2017-01-01T19:00:00Z", "value": 1837280 }, { - "$id": "1008", + "$id": "1010", "timestamp": "2017-01-01T19:05:00Z", "value": 1842939 }, { - "$id": "1009", + "$id": "1011", "timestamp": "2017-01-01T19:10:00Z", "value": 1843126 }, { - "$id": "1010", + "$id": "1012", "timestamp": "2017-01-01T19:15:00Z", "value": 1845840 }, { - "$id": "1011", + "$id": "1013", "timestamp": "2017-01-01T19:20:00Z", "value": 1842444 }, { - "$id": "1012", + "$id": "1014", "timestamp": "2017-01-01T19:25:00Z", "value": 1839891 }, { - "$id": "1013", + "$id": "1015", "timestamp": "2017-01-01T19:30:00Z", "value": 1839875 }, { - "$id": "1014", + "$id": "1016", "timestamp": "2017-01-01T19:35:00Z", "value": 1839870 }, { - "$id": "1015", + "$id": "1017", "timestamp": "2017-01-01T19:40:00Z", "value": 1840090 }, { - "$id": "1016", + "$id": "1018", "timestamp": "2017-01-01T19:45:00Z", "value": 1840479 }, { - "$id": "1017", + "$id": "1019", "timestamp": "2017-01-01T19:50:00Z", "value": 1840479 }, { - "$id": "1018", + "$id": "1020", "timestamp": "2017-01-01T19:55:00Z", "value": 1840482 }, { - "$id": "1019", + "$id": "1021", "timestamp": "2017-01-01T20:00:00Z", "value": 1841522 }, { - "$id": "1020", + "$id": "1022", "timestamp": "2017-01-01T20:05:00Z", "value": 1841836 }, { - "$id": "1021", + "$id": "1023", "timestamp": "2017-01-01T20:10:00Z", "value": 1842377 }, { - "$id": "1022", + "$id": "1024", "timestamp": "2017-01-01T20:15:00Z", "value": 1842388 }, { - "$id": "1023", + "$id": "1025", "timestamp": "2017-01-01T20:20:00Z", "value": 1842489 }, { - "$id": "1024", + "$id": "1026", "timestamp": "2017-01-01T20:25:00Z", "value": 1842489 }, { - "$id": "1025", + "$id": "1027", "timestamp": "2017-01-01T20:30:00Z", "value": 1842489 }, { - "$id": "1026", + "$id": "1028", "timestamp": "2017-01-01T20:35:00Z", "value": 1842496 }, { - "$id": "1027", + "$id": "1029", "timestamp": "2017-01-01T20:40:00Z", "value": 1842689 }, { - "$id": "1028", + "$id": "1030", "timestamp": "2017-01-01T20:45:00Z", "value": 1843117 }, { - "$id": "1029", + "$id": "1031", "timestamp": "2017-01-01T20:50:00Z", "value": 1843116 }, { - "$id": "1030", + "$id": "1032", "timestamp": "2017-01-01T20:55:00Z", "value": 1843227 }, { - "$id": "1031", + "$id": "1033", "timestamp": "2017-01-01T21:00:00Z", "value": 1843138 }, { - "$id": "1032", + "$id": "1034", "timestamp": "2017-01-01T21:05:00Z", "value": 1843141 }, { - "$id": "1033", + "$id": "1035", "timestamp": "2017-01-01T21:10:00Z", "value": 1843310 }, { - "$id": "1034", + "$id": "1036", "timestamp": "2017-01-01T21:15:00Z", "value": 1843310 }, { - "$id": "1035", + "$id": "1037", "timestamp": "2017-01-01T21:20:00Z", "value": 1843507 }, { - "$id": "1036", + "$id": "1038", "timestamp": "2017-01-01T21:25:00Z", "value": 1843953 }, { - "$id": "1037", + "$id": "1039", "timestamp": "2017-01-01T21:30:00Z", "value": 1844778 }, { - "$id": "1038", + "$id": "1040", "timestamp": "2017-01-01T21:35:00Z", "value": 1843918 }, { - "$id": "1039", + "$id": "1041", "timestamp": "2017-01-01T21:40:00Z", "value": 1882692 }, { - "$id": "1040", + "$id": "1042", "timestamp": "2017-01-01T21:45:00Z", "value": 1974888 }, { - "$id": "1041", + "$id": "1043", "timestamp": "2017-01-01T21:50:00Z", "value": 2157136 }, { - "$id": "1042", + "$id": "1044", "timestamp": "2017-01-01T21:55:00Z", "value": 2154987 }, { - "$id": "1043", + "$id": "1045", "timestamp": "2017-01-01T22:00:00Z", "value": 2155664 }, { - "$id": "1044", + "$id": "1046", "timestamp": "2017-01-01T22:05:00Z", "value": 2155660 }, { - "$id": "1045", + "$id": "1047", "timestamp": "2017-01-01T22:10:00Z", "value": 2155824 }, { - "$id": "1046", + "$id": "1048", "timestamp": "2017-01-01T22:15:00Z", "value": 2155824 }, { - "$id": "1047", + "$id": "1049", "timestamp": "2017-01-01T22:20:00Z", "value": 2156329 }, { - "$id": "1048", + "$id": "1050", "timestamp": "2017-01-01T22:25:00Z", "value": 2156479 }, { - "$id": "1049", + "$id": "1051", "timestamp": "2017-01-01T22:30:00Z", "value": 2165269 }, { - "$id": "1050", + "$id": "1052", "timestamp": "2017-01-01T22:35:00Z", "value": 2165433 }, { - "$id": "1051", + "$id": "1053", "timestamp": "2017-01-01T22:40:00Z", "value": 2165739 }, { - "$id": "1052", + "$id": "1054", "timestamp": "2017-01-01T22:45:00Z", "value": 2165931 }, { - "$id": "1053", + "$id": "1055", "timestamp": "2017-01-01T22:50:00Z", "value": 2165928 }, { - "$id": "1054", + "$id": "1056", "timestamp": "2017-01-01T22:55:00Z", "value": 2165989 }, { - "$id": "1055", + "$id": "1057", "timestamp": "2017-01-01T23:00:00Z", "value": 2228961 }, { - "$id": "1056", + "$id": "1058", "timestamp": "2017-01-01T23:05:00Z", "value": 2228961 }, { - "$id": "1057", + "$id": "1059", "timestamp": "2017-01-01T23:10:00Z", "value": 2228961 }, { - "$id": "1058", + "$id": "1060", "timestamp": "2017-01-01T23:15:00Z", "value": 2485802 }, { - "$id": "1059", + "$id": "1061", "timestamp": "2017-01-01T23:20:00Z", "value": 2485802 }, { - "$id": "1060", + "$id": "1062", "timestamp": "2017-01-01T23:25:00Z", "value": 2486021 }, { - "$id": "1061", + "$id": "1063", "timestamp": "2017-01-01T23:30:00Z", "value": 2485293 }, { - "$id": "1062", + "$id": "1064", "timestamp": "2017-01-01T23:35:00Z", "value": 2485293 }, { - "$id": "1063", + "$id": "1065", "timestamp": "2017-01-01T23:40:00Z", "value": 2485324 }, { - "$id": "1064", + "$id": "1066", "timestamp": "2017-01-01T23:45:00Z", "value": 2489142 }, { - "$id": "1065", + "$id": "1067", "timestamp": "2017-01-01T23:50:00Z", "value": 2526312 }, { - "$id": "1066", + "$id": "1068", "timestamp": "2017-01-01T23:55:00Z", "value": 2526313 }, { - "$id": "1067", + "$id": "1069", "timestamp": "2017-01-02T00:00:00Z", "value": 2526314 }, { - "$id": "1068", + "$id": "1070", "timestamp": "2017-01-02T00:05:00Z", "value": 2526324 }, { - "$id": "1069", + "$id": "1071", "timestamp": "2017-01-02T00:10:00Z", "value": 2526325 }, { - "$id": "1070", + "$id": "1072", "timestamp": "2017-01-02T00:15:00Z", "value": 2526205 }, { - "$id": "1071", + "$id": "1073", "timestamp": "2017-01-02T00:20:00Z", "value": 2526226 }, { - "$id": "1072", + "$id": "1074", "timestamp": "2017-01-02T00:25:00Z", "value": 2526475 }, { - "$id": "1073", + "$id": "1075", "timestamp": "2017-01-02T00:30:00Z", "value": 2526471 }, { - "$id": "1074", + "$id": "1076", "timestamp": "2017-01-02T00:35:00Z", "value": 2526471 }, { - "$id": "1075", + "$id": "1077", "timestamp": "2017-01-02T00:40:00Z", "value": 2526534 }, { - "$id": "1076", + "$id": "1078", "timestamp": "2017-01-02T00:45:00Z", "value": 2526646 }, { - "$id": "1077", + "$id": "1079", "timestamp": "2017-01-02T00:50:00Z", "value": 2526646 }, { - "$id": "1078", + "$id": "1080", "timestamp": "2017-01-02T00:55:00Z", "value": 2526648 }, { - "$id": "1079", + "$id": "1081", "timestamp": "2017-01-02T01:00:00Z", "value": 2526658 }, { - "$id": "1080", + "$id": "1082", "timestamp": "2017-01-02T01:05:00Z", "value": 2526771 }, { - "$id": "1081", + "$id": "1083", "timestamp": "2017-01-02T01:10:00Z", "value": 2526773 }, { - "$id": "1082", + "$id": "1084", "timestamp": "2017-01-02T01:15:00Z", "value": 2526793 }, { - "$id": "1083", + "$id": "1085", "timestamp": "2017-01-02T01:20:00Z", "value": 2527010 }, { - "$id": "1084", + "$id": "1086", "timestamp": "2017-01-02T01:25:00Z", "value": 2527031 }, { - "$id": "1085", + "$id": "1087", "timestamp": "2017-01-02T01:30:00Z", "value": 3178096 }, { - "$id": "1086", + "$id": "1088", "timestamp": "2017-01-02T01:35:00Z", "value": 3196305 }, { - "$id": "1087", + "$id": "1089", "timestamp": "2017-01-02T01:40:00Z", "value": 3196202 }, { - "$id": "1088", + "$id": "1090", "timestamp": "2017-01-02T01:45:00Z", "value": 3196202 }, { - "$id": "1089", + "$id": "1091", "timestamp": "2017-01-02T01:50:00Z", "value": 3196205 }, { - "$id": "1090", + "$id": "1092", "timestamp": "2017-01-02T01:55:00Z", "value": 3229232 }, { - "$id": "1091", + "$id": "1093", "timestamp": "2017-01-02T02:00:00Z", "value": 3230463 }, { - "$id": "1092", + "$id": "1094", "timestamp": "2017-01-02T02:05:00Z", "value": 3230468 }, { - "$id": "1093", + "$id": "1095", "timestamp": "2017-01-02T02:10:00Z", "value": 3230468 }, { - "$id": "1094", + "$id": "1096", "timestamp": "2017-01-02T02:15:00Z", "value": 3230468 }, { - "$id": "1095", + "$id": "1097", "timestamp": "2017-01-02T02:20:00Z", "value": 3230470 }, { - "$id": "1096", + "$id": "1098", "timestamp": "2017-01-02T02:25:00Z", "value": 3230467 }, { - "$id": "1097", + "$id": "1099", "timestamp": "2017-01-02T02:30:00Z", "value": 3230506 }, { - "$id": "1098", + "$id": "1100", "timestamp": "2017-01-02T02:35:00Z", "value": 3231536 }, { - "$id": "1099", + "$id": "1101", "timestamp": "2017-01-02T02:40:00Z", "value": 3230723 }, { - "$id": "1100", + "$id": "1102", "timestamp": "2017-01-02T02:45:00Z", "value": 3230727 }, { - "$id": "1101", + "$id": "1103", "timestamp": "2017-01-02T02:50:00Z", "value": 3230727 }, { - "$id": "1102", + "$id": "1104", "timestamp": "2017-01-02T02:55:00Z", "value": 3230727 }, { - "$id": "1103", + "$id": "1105", "timestamp": "2017-01-02T03:00:00Z", "value": 3231880 }, { - "$id": "1104", + "$id": "1106", "timestamp": "2017-01-02T03:05:00Z", "value": 3232283 }, { - "$id": "1105", + "$id": "1107", "timestamp": "2017-01-02T03:10:00Z", "value": 3232283 }, { - "$id": "1106", + "$id": "1108", "timestamp": "2017-01-02T03:15:00Z", "value": 3232283 }, { - "$id": "1107", + "$id": "1109", "timestamp": "2017-01-02T03:20:00Z", "value": 3232325 }, { - "$id": "1108", + "$id": "1110", "timestamp": "2017-01-02T03:25:00Z", "value": 3232323 }, { - "$id": "1109", + "$id": "1111", "timestamp": "2017-01-02T03:30:00Z", "value": 3232327 }, { - "$id": "1110", + "$id": "1112", "timestamp": "2017-01-02T03:35:00Z", "value": 3232340 }, { - "$id": "1111", + "$id": "1113", "timestamp": "2017-01-02T03:40:00Z", "value": 3232713 }, { - "$id": "1112", + "$id": "1114", "timestamp": "2017-01-02T03:45:00Z", "value": 3232729 }, { - "$id": "1113", + "$id": "1115", "timestamp": "2017-01-02T03:50:00Z", "value": 3232756 }, { - "$id": "1114", + "$id": "1116", "timestamp": "2017-01-02T03:55:00Z", "value": 3233500 }, { - "$id": "1115", + "$id": "1117", "timestamp": "2017-01-02T04:00:00Z", "value": 3233500 }, { - "$id": "1116", + "$id": "1118", "timestamp": "2017-01-02T04:05:00Z", "value": 3233500 } @@ -7844,9 +7850,9 @@ }, "responses": { "200": { - "$id": "1118", + "$id": "1120", "body": { - "$id": "1119", + "$id": "1121", "period": 0, "confidenceScores": [ 0.11841763735063232, @@ -8368,40 +8374,40 @@ ] } }, - "$id": "1117" + "$id": "1119" } }, "parameters": [ { - "$id": "1120", + "$id": "1122", "parameter": { - "$ref": "854" + "$ref": "856" }, "value": { - "$id": "1121", + "$id": "1123", "kind": "model", "type": { "$ref": "284" }, "value": { - "$id": "1122", + "$id": "1124", "series": { - "$id": "1123", + "$id": "1125", "kind": "array", "type": { "$ref": "286" }, "value": [ { - "$id": "1124", + "$id": "1126", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1125", + "$id": "1127", "timestamp": { - "$id": "1126", + "$id": "1128", "kind": "string", "type": { "$ref": "221" @@ -8409,7 +8415,7 @@ "value": "2017-01-01T06:45:00Z" }, "value": { - "$id": "1127", + "$id": "1129", "kind": "number", "type": { "$ref": "224" @@ -8419,15 +8425,15 @@ } }, { - "$id": "1128", + "$id": "1130", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1129", + "$id": "1131", "timestamp": { - "$id": "1130", + "$id": "1132", "kind": "string", "type": { "$ref": "221" @@ -8435,7 +8441,7 @@ "value": "2017-01-01T06:50:00Z" }, "value": { - "$id": "1131", + "$id": "1133", "kind": "number", "type": { "$ref": "224" @@ -8445,15 +8451,15 @@ } }, { - "$id": "1132", + "$id": "1134", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1133", + "$id": "1135", "timestamp": { - "$id": "1134", + "$id": "1136", "kind": "string", "type": { "$ref": "221" @@ -8461,7 +8467,7 @@ "value": "2017-01-01T06:55:00Z" }, "value": { - "$id": "1135", + "$id": "1137", "kind": "number", "type": { "$ref": "224" @@ -8471,15 +8477,15 @@ } }, { - "$id": "1136", + "$id": "1138", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1137", + "$id": "1139", "timestamp": { - "$id": "1138", + "$id": "1140", "kind": "string", "type": { "$ref": "221" @@ -8487,7 +8493,7 @@ "value": "2017-01-01T07:00:00Z" }, "value": { - "$id": "1139", + "$id": "1141", "kind": "number", "type": { "$ref": "224" @@ -8497,15 +8503,15 @@ } }, { - "$id": "1140", + "$id": "1142", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1141", + "$id": "1143", "timestamp": { - "$id": "1142", + "$id": "1144", "kind": "string", "type": { "$ref": "221" @@ -8513,7 +8519,7 @@ "value": "2017-01-01T07:05:00Z" }, "value": { - "$id": "1143", + "$id": "1145", "kind": "number", "type": { "$ref": "224" @@ -8523,15 +8529,15 @@ } }, { - "$id": "1144", + "$id": "1146", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1145", + "$id": "1147", "timestamp": { - "$id": "1146", + "$id": "1148", "kind": "string", "type": { "$ref": "221" @@ -8539,7 +8545,7 @@ "value": "2017-01-01T07:10:00Z" }, "value": { - "$id": "1147", + "$id": "1149", "kind": "number", "type": { "$ref": "224" @@ -8549,15 +8555,15 @@ } }, { - "$id": "1148", + "$id": "1150", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1149", + "$id": "1151", "timestamp": { - "$id": "1150", + "$id": "1152", "kind": "string", "type": { "$ref": "221" @@ -8565,7 +8571,7 @@ "value": "2017-01-01T07:15:00Z" }, "value": { - "$id": "1151", + "$id": "1153", "kind": "number", "type": { "$ref": "224" @@ -8575,15 +8581,15 @@ } }, { - "$id": "1152", + "$id": "1154", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1153", + "$id": "1155", "timestamp": { - "$id": "1154", + "$id": "1156", "kind": "string", "type": { "$ref": "221" @@ -8591,7 +8597,7 @@ "value": "2017-01-01T07:20:00Z" }, "value": { - "$id": "1155", + "$id": "1157", "kind": "number", "type": { "$ref": "224" @@ -8601,15 +8607,15 @@ } }, { - "$id": "1156", + "$id": "1158", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1157", + "$id": "1159", "timestamp": { - "$id": "1158", + "$id": "1160", "kind": "string", "type": { "$ref": "221" @@ -8617,7 +8623,7 @@ "value": "2017-01-01T07:25:00Z" }, "value": { - "$id": "1159", + "$id": "1161", "kind": "number", "type": { "$ref": "224" @@ -8627,15 +8633,15 @@ } }, { - "$id": "1160", + "$id": "1162", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1161", + "$id": "1163", "timestamp": { - "$id": "1162", + "$id": "1164", "kind": "string", "type": { "$ref": "221" @@ -8643,7 +8649,7 @@ "value": "2017-01-01T07:30:00Z" }, "value": { - "$id": "1163", + "$id": "1165", "kind": "number", "type": { "$ref": "224" @@ -8653,15 +8659,15 @@ } }, { - "$id": "1164", + "$id": "1166", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1165", + "$id": "1167", "timestamp": { - "$id": "1166", + "$id": "1168", "kind": "string", "type": { "$ref": "221" @@ -8669,7 +8675,7 @@ "value": "2017-01-01T07:35:00Z" }, "value": { - "$id": "1167", + "$id": "1169", "kind": "number", "type": { "$ref": "224" @@ -8679,15 +8685,15 @@ } }, { - "$id": "1168", + "$id": "1170", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1169", + "$id": "1171", "timestamp": { - "$id": "1170", + "$id": "1172", "kind": "string", "type": { "$ref": "221" @@ -8695,7 +8701,7 @@ "value": "2017-01-01T07:40:00Z" }, "value": { - "$id": "1171", + "$id": "1173", "kind": "number", "type": { "$ref": "224" @@ -8705,15 +8711,15 @@ } }, { - "$id": "1172", + "$id": "1174", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1173", + "$id": "1175", "timestamp": { - "$id": "1174", + "$id": "1176", "kind": "string", "type": { "$ref": "221" @@ -8721,7 +8727,7 @@ "value": "2017-01-01T07:45:00Z" }, "value": { - "$id": "1175", + "$id": "1177", "kind": "number", "type": { "$ref": "224" @@ -8731,15 +8737,15 @@ } }, { - "$id": "1176", + "$id": "1178", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1177", + "$id": "1179", "timestamp": { - "$id": "1178", + "$id": "1180", "kind": "string", "type": { "$ref": "221" @@ -8747,7 +8753,7 @@ "value": "2017-01-01T07:50:00Z" }, "value": { - "$id": "1179", + "$id": "1181", "kind": "number", "type": { "$ref": "224" @@ -8757,15 +8763,15 @@ } }, { - "$id": "1180", + "$id": "1182", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1181", + "$id": "1183", "timestamp": { - "$id": "1182", + "$id": "1184", "kind": "string", "type": { "$ref": "221" @@ -8773,7 +8779,7 @@ "value": "2017-01-01T07:55:00Z" }, "value": { - "$id": "1183", + "$id": "1185", "kind": "number", "type": { "$ref": "224" @@ -8783,15 +8789,15 @@ } }, { - "$id": "1184", + "$id": "1186", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1185", + "$id": "1187", "timestamp": { - "$id": "1186", + "$id": "1188", "kind": "string", "type": { "$ref": "221" @@ -8799,7 +8805,7 @@ "value": "2017-01-01T08:00:00Z" }, "value": { - "$id": "1187", + "$id": "1189", "kind": "number", "type": { "$ref": "224" @@ -8809,15 +8815,15 @@ } }, { - "$id": "1188", + "$id": "1190", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1189", + "$id": "1191", "timestamp": { - "$id": "1190", + "$id": "1192", "kind": "string", "type": { "$ref": "221" @@ -8825,7 +8831,7 @@ "value": "2017-01-01T08:05:00Z" }, "value": { - "$id": "1191", + "$id": "1193", "kind": "number", "type": { "$ref": "224" @@ -8835,15 +8841,15 @@ } }, { - "$id": "1192", + "$id": "1194", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1193", + "$id": "1195", "timestamp": { - "$id": "1194", + "$id": "1196", "kind": "string", "type": { "$ref": "221" @@ -8851,7 +8857,7 @@ "value": "2017-01-01T08:10:00Z" }, "value": { - "$id": "1195", + "$id": "1197", "kind": "number", "type": { "$ref": "224" @@ -8861,15 +8867,15 @@ } }, { - "$id": "1196", + "$id": "1198", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1197", + "$id": "1199", "timestamp": { - "$id": "1198", + "$id": "1200", "kind": "string", "type": { "$ref": "221" @@ -8877,7 +8883,7 @@ "value": "2017-01-01T08:15:00Z" }, "value": { - "$id": "1199", + "$id": "1201", "kind": "number", "type": { "$ref": "224" @@ -8887,15 +8893,15 @@ } }, { - "$id": "1200", + "$id": "1202", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1201", + "$id": "1203", "timestamp": { - "$id": "1202", + "$id": "1204", "kind": "string", "type": { "$ref": "221" @@ -8903,7 +8909,7 @@ "value": "2017-01-01T08:20:00Z" }, "value": { - "$id": "1203", + "$id": "1205", "kind": "number", "type": { "$ref": "224" @@ -8913,15 +8919,15 @@ } }, { - "$id": "1204", + "$id": "1206", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1205", + "$id": "1207", "timestamp": { - "$id": "1206", + "$id": "1208", "kind": "string", "type": { "$ref": "221" @@ -8929,7 +8935,7 @@ "value": "2017-01-01T08:25:00Z" }, "value": { - "$id": "1207", + "$id": "1209", "kind": "number", "type": { "$ref": "224" @@ -8939,15 +8945,15 @@ } }, { - "$id": "1208", + "$id": "1210", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1209", + "$id": "1211", "timestamp": { - "$id": "1210", + "$id": "1212", "kind": "string", "type": { "$ref": "221" @@ -8955,7 +8961,7 @@ "value": "2017-01-01T08:30:00Z" }, "value": { - "$id": "1211", + "$id": "1213", "kind": "number", "type": { "$ref": "224" @@ -8965,15 +8971,15 @@ } }, { - "$id": "1212", + "$id": "1214", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1213", + "$id": "1215", "timestamp": { - "$id": "1214", + "$id": "1216", "kind": "string", "type": { "$ref": "221" @@ -8981,7 +8987,7 @@ "value": "2017-01-01T08:35:00Z" }, "value": { - "$id": "1215", + "$id": "1217", "kind": "number", "type": { "$ref": "224" @@ -8991,15 +8997,15 @@ } }, { - "$id": "1216", + "$id": "1218", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1217", + "$id": "1219", "timestamp": { - "$id": "1218", + "$id": "1220", "kind": "string", "type": { "$ref": "221" @@ -9007,7 +9013,7 @@ "value": "2017-01-01T08:40:00Z" }, "value": { - "$id": "1219", + "$id": "1221", "kind": "number", "type": { "$ref": "224" @@ -9017,15 +9023,15 @@ } }, { - "$id": "1220", + "$id": "1222", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1221", + "$id": "1223", "timestamp": { - "$id": "1222", + "$id": "1224", "kind": "string", "type": { "$ref": "221" @@ -9033,7 +9039,7 @@ "value": "2017-01-01T08:45:00Z" }, "value": { - "$id": "1223", + "$id": "1225", "kind": "number", "type": { "$ref": "224" @@ -9043,15 +9049,15 @@ } }, { - "$id": "1224", + "$id": "1226", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1225", + "$id": "1227", "timestamp": { - "$id": "1226", + "$id": "1228", "kind": "string", "type": { "$ref": "221" @@ -9059,7 +9065,7 @@ "value": "2017-01-01T08:50:00Z" }, "value": { - "$id": "1227", + "$id": "1229", "kind": "number", "type": { "$ref": "224" @@ -9069,15 +9075,15 @@ } }, { - "$id": "1228", + "$id": "1230", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1229", + "$id": "1231", "timestamp": { - "$id": "1230", + "$id": "1232", "kind": "string", "type": { "$ref": "221" @@ -9085,7 +9091,7 @@ "value": "2017-01-01T08:55:00Z" }, "value": { - "$id": "1231", + "$id": "1233", "kind": "number", "type": { "$ref": "224" @@ -9095,15 +9101,15 @@ } }, { - "$id": "1232", + "$id": "1234", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1233", + "$id": "1235", "timestamp": { - "$id": "1234", + "$id": "1236", "kind": "string", "type": { "$ref": "221" @@ -9111,7 +9117,7 @@ "value": "2017-01-01T09:00:00Z" }, "value": { - "$id": "1235", + "$id": "1237", "kind": "number", "type": { "$ref": "224" @@ -9121,15 +9127,15 @@ } }, { - "$id": "1236", + "$id": "1238", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1237", + "$id": "1239", "timestamp": { - "$id": "1238", + "$id": "1240", "kind": "string", "type": { "$ref": "221" @@ -9137,7 +9143,7 @@ "value": "2017-01-01T09:05:00Z" }, "value": { - "$id": "1239", + "$id": "1241", "kind": "number", "type": { "$ref": "224" @@ -9147,15 +9153,15 @@ } }, { - "$id": "1240", + "$id": "1242", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1241", + "$id": "1243", "timestamp": { - "$id": "1242", + "$id": "1244", "kind": "string", "type": { "$ref": "221" @@ -9163,7 +9169,7 @@ "value": "2017-01-01T09:10:00Z" }, "value": { - "$id": "1243", + "$id": "1245", "kind": "number", "type": { "$ref": "224" @@ -9173,15 +9179,15 @@ } }, { - "$id": "1244", + "$id": "1246", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1245", + "$id": "1247", "timestamp": { - "$id": "1246", + "$id": "1248", "kind": "string", "type": { "$ref": "221" @@ -9189,7 +9195,7 @@ "value": "2017-01-01T09:15:00Z" }, "value": { - "$id": "1247", + "$id": "1249", "kind": "number", "type": { "$ref": "224" @@ -9199,15 +9205,15 @@ } }, { - "$id": "1248", + "$id": "1250", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1249", + "$id": "1251", "timestamp": { - "$id": "1250", + "$id": "1252", "kind": "string", "type": { "$ref": "221" @@ -9215,7 +9221,7 @@ "value": "2017-01-01T09:20:00Z" }, "value": { - "$id": "1251", + "$id": "1253", "kind": "number", "type": { "$ref": "224" @@ -9225,15 +9231,15 @@ } }, { - "$id": "1252", + "$id": "1254", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1253", + "$id": "1255", "timestamp": { - "$id": "1254", + "$id": "1256", "kind": "string", "type": { "$ref": "221" @@ -9241,7 +9247,7 @@ "value": "2017-01-01T09:25:00Z" }, "value": { - "$id": "1255", + "$id": "1257", "kind": "number", "type": { "$ref": "224" @@ -9251,15 +9257,15 @@ } }, { - "$id": "1256", + "$id": "1258", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1257", + "$id": "1259", "timestamp": { - "$id": "1258", + "$id": "1260", "kind": "string", "type": { "$ref": "221" @@ -9267,7 +9273,7 @@ "value": "2017-01-01T09:30:00Z" }, "value": { - "$id": "1259", + "$id": "1261", "kind": "number", "type": { "$ref": "224" @@ -9277,15 +9283,15 @@ } }, { - "$id": "1260", + "$id": "1262", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1261", + "$id": "1263", "timestamp": { - "$id": "1262", + "$id": "1264", "kind": "string", "type": { "$ref": "221" @@ -9293,7 +9299,7 @@ "value": "2017-01-01T09:35:00Z" }, "value": { - "$id": "1263", + "$id": "1265", "kind": "number", "type": { "$ref": "224" @@ -9303,15 +9309,15 @@ } }, { - "$id": "1264", + "$id": "1266", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1265", + "$id": "1267", "timestamp": { - "$id": "1266", + "$id": "1268", "kind": "string", "type": { "$ref": "221" @@ -9319,7 +9325,7 @@ "value": "2017-01-01T09:40:00Z" }, "value": { - "$id": "1267", + "$id": "1269", "kind": "number", "type": { "$ref": "224" @@ -9329,15 +9335,15 @@ } }, { - "$id": "1268", + "$id": "1270", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1269", + "$id": "1271", "timestamp": { - "$id": "1270", + "$id": "1272", "kind": "string", "type": { "$ref": "221" @@ -9345,7 +9351,7 @@ "value": "2017-01-01T09:45:00Z" }, "value": { - "$id": "1271", + "$id": "1273", "kind": "number", "type": { "$ref": "224" @@ -9355,15 +9361,15 @@ } }, { - "$id": "1272", + "$id": "1274", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1273", + "$id": "1275", "timestamp": { - "$id": "1274", + "$id": "1276", "kind": "string", "type": { "$ref": "221" @@ -9371,7 +9377,7 @@ "value": "2017-01-01T09:50:00Z" }, "value": { - "$id": "1275", + "$id": "1277", "kind": "number", "type": { "$ref": "224" @@ -9381,15 +9387,15 @@ } }, { - "$id": "1276", + "$id": "1278", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1277", + "$id": "1279", "timestamp": { - "$id": "1278", + "$id": "1280", "kind": "string", "type": { "$ref": "221" @@ -9397,7 +9403,7 @@ "value": "2017-01-01T09:55:00Z" }, "value": { - "$id": "1279", + "$id": "1281", "kind": "number", "type": { "$ref": "224" @@ -9407,15 +9413,15 @@ } }, { - "$id": "1280", + "$id": "1282", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1281", + "$id": "1283", "timestamp": { - "$id": "1282", + "$id": "1284", "kind": "string", "type": { "$ref": "221" @@ -9423,7 +9429,7 @@ "value": "2017-01-01T10:00:00Z" }, "value": { - "$id": "1283", + "$id": "1285", "kind": "number", "type": { "$ref": "224" @@ -9433,15 +9439,15 @@ } }, { - "$id": "1284", + "$id": "1286", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1285", + "$id": "1287", "timestamp": { - "$id": "1286", + "$id": "1288", "kind": "string", "type": { "$ref": "221" @@ -9449,7 +9455,7 @@ "value": "2017-01-01T10:05:00Z" }, "value": { - "$id": "1287", + "$id": "1289", "kind": "number", "type": { "$ref": "224" @@ -9459,15 +9465,15 @@ } }, { - "$id": "1288", + "$id": "1290", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1289", + "$id": "1291", "timestamp": { - "$id": "1290", + "$id": "1292", "kind": "string", "type": { "$ref": "221" @@ -9475,7 +9481,7 @@ "value": "2017-01-01T10:10:00Z" }, "value": { - "$id": "1291", + "$id": "1293", "kind": "number", "type": { "$ref": "224" @@ -9485,15 +9491,15 @@ } }, { - "$id": "1292", + "$id": "1294", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1293", + "$id": "1295", "timestamp": { - "$id": "1294", + "$id": "1296", "kind": "string", "type": { "$ref": "221" @@ -9501,7 +9507,7 @@ "value": "2017-01-01T10:15:00Z" }, "value": { - "$id": "1295", + "$id": "1297", "kind": "number", "type": { "$ref": "224" @@ -9511,15 +9517,15 @@ } }, { - "$id": "1296", + "$id": "1298", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1297", + "$id": "1299", "timestamp": { - "$id": "1298", + "$id": "1300", "kind": "string", "type": { "$ref": "221" @@ -9527,7 +9533,7 @@ "value": "2017-01-01T10:20:00Z" }, "value": { - "$id": "1299", + "$id": "1301", "kind": "number", "type": { "$ref": "224" @@ -9537,15 +9543,15 @@ } }, { - "$id": "1300", + "$id": "1302", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1301", + "$id": "1303", "timestamp": { - "$id": "1302", + "$id": "1304", "kind": "string", "type": { "$ref": "221" @@ -9553,7 +9559,7 @@ "value": "2017-01-01T10:25:00Z" }, "value": { - "$id": "1303", + "$id": "1305", "kind": "number", "type": { "$ref": "224" @@ -9563,15 +9569,15 @@ } }, { - "$id": "1304", + "$id": "1306", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1305", + "$id": "1307", "timestamp": { - "$id": "1306", + "$id": "1308", "kind": "string", "type": { "$ref": "221" @@ -9579,7 +9585,7 @@ "value": "2017-01-01T10:30:00Z" }, "value": { - "$id": "1307", + "$id": "1309", "kind": "number", "type": { "$ref": "224" @@ -9589,15 +9595,15 @@ } }, { - "$id": "1308", + "$id": "1310", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1309", + "$id": "1311", "timestamp": { - "$id": "1310", + "$id": "1312", "kind": "string", "type": { "$ref": "221" @@ -9605,7 +9611,7 @@ "value": "2017-01-01T10:35:00Z" }, "value": { - "$id": "1311", + "$id": "1313", "kind": "number", "type": { "$ref": "224" @@ -9615,15 +9621,15 @@ } }, { - "$id": "1312", + "$id": "1314", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1313", + "$id": "1315", "timestamp": { - "$id": "1314", + "$id": "1316", "kind": "string", "type": { "$ref": "221" @@ -9631,7 +9637,7 @@ "value": "2017-01-01T10:40:00Z" }, "value": { - "$id": "1315", + "$id": "1317", "kind": "number", "type": { "$ref": "224" @@ -9641,15 +9647,15 @@ } }, { - "$id": "1316", + "$id": "1318", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1317", + "$id": "1319", "timestamp": { - "$id": "1318", + "$id": "1320", "kind": "string", "type": { "$ref": "221" @@ -9657,7 +9663,7 @@ "value": "2017-01-01T10:45:00Z" }, "value": { - "$id": "1319", + "$id": "1321", "kind": "number", "type": { "$ref": "224" @@ -9667,15 +9673,15 @@ } }, { - "$id": "1320", + "$id": "1322", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1321", + "$id": "1323", "timestamp": { - "$id": "1322", + "$id": "1324", "kind": "string", "type": { "$ref": "221" @@ -9683,7 +9689,7 @@ "value": "2017-01-01T10:50:00Z" }, "value": { - "$id": "1323", + "$id": "1325", "kind": "number", "type": { "$ref": "224" @@ -9693,15 +9699,15 @@ } }, { - "$id": "1324", + "$id": "1326", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1325", + "$id": "1327", "timestamp": { - "$id": "1326", + "$id": "1328", "kind": "string", "type": { "$ref": "221" @@ -9709,7 +9715,7 @@ "value": "2017-01-01T10:55:00Z" }, "value": { - "$id": "1327", + "$id": "1329", "kind": "number", "type": { "$ref": "224" @@ -9719,15 +9725,15 @@ } }, { - "$id": "1328", + "$id": "1330", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1329", + "$id": "1331", "timestamp": { - "$id": "1330", + "$id": "1332", "kind": "string", "type": { "$ref": "221" @@ -9735,7 +9741,7 @@ "value": "2017-01-01T11:00:00Z" }, "value": { - "$id": "1331", + "$id": "1333", "kind": "number", "type": { "$ref": "224" @@ -9745,15 +9751,15 @@ } }, { - "$id": "1332", + "$id": "1334", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1333", + "$id": "1335", "timestamp": { - "$id": "1334", + "$id": "1336", "kind": "string", "type": { "$ref": "221" @@ -9761,7 +9767,7 @@ "value": "2017-01-01T11:05:00Z" }, "value": { - "$id": "1335", + "$id": "1337", "kind": "number", "type": { "$ref": "224" @@ -9771,15 +9777,15 @@ } }, { - "$id": "1336", + "$id": "1338", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1337", + "$id": "1339", "timestamp": { - "$id": "1338", + "$id": "1340", "kind": "string", "type": { "$ref": "221" @@ -9787,7 +9793,7 @@ "value": "2017-01-01T11:10:00Z" }, "value": { - "$id": "1339", + "$id": "1341", "kind": "number", "type": { "$ref": "224" @@ -9797,15 +9803,15 @@ } }, { - "$id": "1340", + "$id": "1342", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1341", + "$id": "1343", "timestamp": { - "$id": "1342", + "$id": "1344", "kind": "string", "type": { "$ref": "221" @@ -9813,7 +9819,7 @@ "value": "2017-01-01T11:15:00Z" }, "value": { - "$id": "1343", + "$id": "1345", "kind": "number", "type": { "$ref": "224" @@ -9823,15 +9829,15 @@ } }, { - "$id": "1344", + "$id": "1346", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1345", + "$id": "1347", "timestamp": { - "$id": "1346", + "$id": "1348", "kind": "string", "type": { "$ref": "221" @@ -9839,7 +9845,7 @@ "value": "2017-01-01T11:20:00Z" }, "value": { - "$id": "1347", + "$id": "1349", "kind": "number", "type": { "$ref": "224" @@ -9849,15 +9855,15 @@ } }, { - "$id": "1348", + "$id": "1350", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1349", + "$id": "1351", "timestamp": { - "$id": "1350", + "$id": "1352", "kind": "string", "type": { "$ref": "221" @@ -9865,7 +9871,7 @@ "value": "2017-01-01T11:25:00Z" }, "value": { - "$id": "1351", + "$id": "1353", "kind": "number", "type": { "$ref": "224" @@ -9875,15 +9881,15 @@ } }, { - "$id": "1352", + "$id": "1354", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1353", + "$id": "1355", "timestamp": { - "$id": "1354", + "$id": "1356", "kind": "string", "type": { "$ref": "221" @@ -9891,7 +9897,7 @@ "value": "2017-01-01T11:30:00Z" }, "value": { - "$id": "1355", + "$id": "1357", "kind": "number", "type": { "$ref": "224" @@ -9901,15 +9907,15 @@ } }, { - "$id": "1356", + "$id": "1358", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1357", + "$id": "1359", "timestamp": { - "$id": "1358", + "$id": "1360", "kind": "string", "type": { "$ref": "221" @@ -9917,7 +9923,7 @@ "value": "2017-01-01T11:35:00Z" }, "value": { - "$id": "1359", + "$id": "1361", "kind": "number", "type": { "$ref": "224" @@ -9927,15 +9933,15 @@ } }, { - "$id": "1360", + "$id": "1362", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1361", + "$id": "1363", "timestamp": { - "$id": "1362", + "$id": "1364", "kind": "string", "type": { "$ref": "221" @@ -9943,7 +9949,7 @@ "value": "2017-01-01T11:40:00Z" }, "value": { - "$id": "1363", + "$id": "1365", "kind": "number", "type": { "$ref": "224" @@ -9953,15 +9959,15 @@ } }, { - "$id": "1364", + "$id": "1366", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1365", + "$id": "1367", "timestamp": { - "$id": "1366", + "$id": "1368", "kind": "string", "type": { "$ref": "221" @@ -9969,7 +9975,7 @@ "value": "2017-01-01T11:45:00Z" }, "value": { - "$id": "1367", + "$id": "1369", "kind": "number", "type": { "$ref": "224" @@ -9979,15 +9985,15 @@ } }, { - "$id": "1368", + "$id": "1370", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1369", + "$id": "1371", "timestamp": { - "$id": "1370", + "$id": "1372", "kind": "string", "type": { "$ref": "221" @@ -9995,7 +10001,7 @@ "value": "2017-01-01T11:50:00Z" }, "value": { - "$id": "1371", + "$id": "1373", "kind": "number", "type": { "$ref": "224" @@ -10005,15 +10011,15 @@ } }, { - "$id": "1372", + "$id": "1374", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1373", + "$id": "1375", "timestamp": { - "$id": "1374", + "$id": "1376", "kind": "string", "type": { "$ref": "221" @@ -10021,7 +10027,7 @@ "value": "2017-01-01T11:55:00Z" }, "value": { - "$id": "1375", + "$id": "1377", "kind": "number", "type": { "$ref": "224" @@ -10031,15 +10037,15 @@ } }, { - "$id": "1376", + "$id": "1378", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1377", + "$id": "1379", "timestamp": { - "$id": "1378", + "$id": "1380", "kind": "string", "type": { "$ref": "221" @@ -10047,7 +10053,7 @@ "value": "2017-01-01T12:00:00Z" }, "value": { - "$id": "1379", + "$id": "1381", "kind": "number", "type": { "$ref": "224" @@ -10057,15 +10063,15 @@ } }, { - "$id": "1380", + "$id": "1382", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1381", + "$id": "1383", "timestamp": { - "$id": "1382", + "$id": "1384", "kind": "string", "type": { "$ref": "221" @@ -10073,7 +10079,7 @@ "value": "2017-01-01T12:05:00Z" }, "value": { - "$id": "1383", + "$id": "1385", "kind": "number", "type": { "$ref": "224" @@ -10083,15 +10089,15 @@ } }, { - "$id": "1384", + "$id": "1386", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1385", + "$id": "1387", "timestamp": { - "$id": "1386", + "$id": "1388", "kind": "string", "type": { "$ref": "221" @@ -10099,7 +10105,7 @@ "value": "2017-01-01T12:10:00Z" }, "value": { - "$id": "1387", + "$id": "1389", "kind": "number", "type": { "$ref": "224" @@ -10109,15 +10115,15 @@ } }, { - "$id": "1388", + "$id": "1390", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1389", + "$id": "1391", "timestamp": { - "$id": "1390", + "$id": "1392", "kind": "string", "type": { "$ref": "221" @@ -10125,7 +10131,7 @@ "value": "2017-01-01T12:15:00Z" }, "value": { - "$id": "1391", + "$id": "1393", "kind": "number", "type": { "$ref": "224" @@ -10135,15 +10141,15 @@ } }, { - "$id": "1392", + "$id": "1394", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1393", + "$id": "1395", "timestamp": { - "$id": "1394", + "$id": "1396", "kind": "string", "type": { "$ref": "221" @@ -10151,7 +10157,7 @@ "value": "2017-01-01T12:20:00Z" }, "value": { - "$id": "1395", + "$id": "1397", "kind": "number", "type": { "$ref": "224" @@ -10161,15 +10167,15 @@ } }, { - "$id": "1396", + "$id": "1398", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1397", + "$id": "1399", "timestamp": { - "$id": "1398", + "$id": "1400", "kind": "string", "type": { "$ref": "221" @@ -10177,7 +10183,7 @@ "value": "2017-01-01T12:25:00Z" }, "value": { - "$id": "1399", + "$id": "1401", "kind": "number", "type": { "$ref": "224" @@ -10187,15 +10193,15 @@ } }, { - "$id": "1400", + "$id": "1402", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1401", + "$id": "1403", "timestamp": { - "$id": "1402", + "$id": "1404", "kind": "string", "type": { "$ref": "221" @@ -10203,7 +10209,7 @@ "value": "2017-01-01T12:30:00Z" }, "value": { - "$id": "1403", + "$id": "1405", "kind": "number", "type": { "$ref": "224" @@ -10213,15 +10219,15 @@ } }, { - "$id": "1404", + "$id": "1406", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1405", + "$id": "1407", "timestamp": { - "$id": "1406", + "$id": "1408", "kind": "string", "type": { "$ref": "221" @@ -10229,7 +10235,7 @@ "value": "2017-01-01T12:35:00Z" }, "value": { - "$id": "1407", + "$id": "1409", "kind": "number", "type": { "$ref": "224" @@ -10239,15 +10245,15 @@ } }, { - "$id": "1408", + "$id": "1410", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1409", + "$id": "1411", "timestamp": { - "$id": "1410", + "$id": "1412", "kind": "string", "type": { "$ref": "221" @@ -10255,7 +10261,7 @@ "value": "2017-01-01T12:40:00Z" }, "value": { - "$id": "1411", + "$id": "1413", "kind": "number", "type": { "$ref": "224" @@ -10265,15 +10271,15 @@ } }, { - "$id": "1412", + "$id": "1414", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1413", + "$id": "1415", "timestamp": { - "$id": "1414", + "$id": "1416", "kind": "string", "type": { "$ref": "221" @@ -10281,7 +10287,7 @@ "value": "2017-01-01T12:45:00Z" }, "value": { - "$id": "1415", + "$id": "1417", "kind": "number", "type": { "$ref": "224" @@ -10291,15 +10297,15 @@ } }, { - "$id": "1416", + "$id": "1418", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1417", + "$id": "1419", "timestamp": { - "$id": "1418", + "$id": "1420", "kind": "string", "type": { "$ref": "221" @@ -10307,7 +10313,7 @@ "value": "2017-01-01T12:50:00Z" }, "value": { - "$id": "1419", + "$id": "1421", "kind": "number", "type": { "$ref": "224" @@ -10317,15 +10323,15 @@ } }, { - "$id": "1420", + "$id": "1422", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1421", + "$id": "1423", "timestamp": { - "$id": "1422", + "$id": "1424", "kind": "string", "type": { "$ref": "221" @@ -10333,7 +10339,7 @@ "value": "2017-01-01T12:55:00Z" }, "value": { - "$id": "1423", + "$id": "1425", "kind": "number", "type": { "$ref": "224" @@ -10343,15 +10349,15 @@ } }, { - "$id": "1424", + "$id": "1426", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1425", + "$id": "1427", "timestamp": { - "$id": "1426", + "$id": "1428", "kind": "string", "type": { "$ref": "221" @@ -10359,7 +10365,7 @@ "value": "2017-01-01T13:00:00Z" }, "value": { - "$id": "1427", + "$id": "1429", "kind": "number", "type": { "$ref": "224" @@ -10369,15 +10375,15 @@ } }, { - "$id": "1428", + "$id": "1430", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1429", + "$id": "1431", "timestamp": { - "$id": "1430", + "$id": "1432", "kind": "string", "type": { "$ref": "221" @@ -10385,7 +10391,7 @@ "value": "2017-01-01T13:05:00Z" }, "value": { - "$id": "1431", + "$id": "1433", "kind": "number", "type": { "$ref": "224" @@ -10395,15 +10401,15 @@ } }, { - "$id": "1432", + "$id": "1434", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1433", + "$id": "1435", "timestamp": { - "$id": "1434", + "$id": "1436", "kind": "string", "type": { "$ref": "221" @@ -10411,7 +10417,7 @@ "value": "2017-01-01T13:10:00Z" }, "value": { - "$id": "1435", + "$id": "1437", "kind": "number", "type": { "$ref": "224" @@ -10421,15 +10427,15 @@ } }, { - "$id": "1436", + "$id": "1438", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1437", + "$id": "1439", "timestamp": { - "$id": "1438", + "$id": "1440", "kind": "string", "type": { "$ref": "221" @@ -10437,7 +10443,7 @@ "value": "2017-01-01T13:15:00Z" }, "value": { - "$id": "1439", + "$id": "1441", "kind": "number", "type": { "$ref": "224" @@ -10447,15 +10453,15 @@ } }, { - "$id": "1440", + "$id": "1442", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1441", + "$id": "1443", "timestamp": { - "$id": "1442", + "$id": "1444", "kind": "string", "type": { "$ref": "221" @@ -10463,7 +10469,7 @@ "value": "2017-01-01T13:20:00Z" }, "value": { - "$id": "1443", + "$id": "1445", "kind": "number", "type": { "$ref": "224" @@ -10473,15 +10479,15 @@ } }, { - "$id": "1444", + "$id": "1446", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1445", + "$id": "1447", "timestamp": { - "$id": "1446", + "$id": "1448", "kind": "string", "type": { "$ref": "221" @@ -10489,7 +10495,7 @@ "value": "2017-01-01T13:25:00Z" }, "value": { - "$id": "1447", + "$id": "1449", "kind": "number", "type": { "$ref": "224" @@ -10499,15 +10505,15 @@ } }, { - "$id": "1448", + "$id": "1450", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1449", + "$id": "1451", "timestamp": { - "$id": "1450", + "$id": "1452", "kind": "string", "type": { "$ref": "221" @@ -10515,7 +10521,7 @@ "value": "2017-01-01T13:30:00Z" }, "value": { - "$id": "1451", + "$id": "1453", "kind": "number", "type": { "$ref": "224" @@ -10525,15 +10531,15 @@ } }, { - "$id": "1452", + "$id": "1454", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1453", + "$id": "1455", "timestamp": { - "$id": "1454", + "$id": "1456", "kind": "string", "type": { "$ref": "221" @@ -10541,7 +10547,7 @@ "value": "2017-01-01T13:35:00Z" }, "value": { - "$id": "1455", + "$id": "1457", "kind": "number", "type": { "$ref": "224" @@ -10551,15 +10557,15 @@ } }, { - "$id": "1456", + "$id": "1458", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1457", + "$id": "1459", "timestamp": { - "$id": "1458", + "$id": "1460", "kind": "string", "type": { "$ref": "221" @@ -10567,7 +10573,7 @@ "value": "2017-01-01T13:40:00Z" }, "value": { - "$id": "1459", + "$id": "1461", "kind": "number", "type": { "$ref": "224" @@ -10577,15 +10583,15 @@ } }, { - "$id": "1460", + "$id": "1462", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1461", + "$id": "1463", "timestamp": { - "$id": "1462", + "$id": "1464", "kind": "string", "type": { "$ref": "221" @@ -10593,7 +10599,7 @@ "value": "2017-01-01T13:45:00Z" }, "value": { - "$id": "1463", + "$id": "1465", "kind": "number", "type": { "$ref": "224" @@ -10603,15 +10609,15 @@ } }, { - "$id": "1464", + "$id": "1466", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1465", + "$id": "1467", "timestamp": { - "$id": "1466", + "$id": "1468", "kind": "string", "type": { "$ref": "221" @@ -10619,7 +10625,7 @@ "value": "2017-01-01T13:50:00Z" }, "value": { - "$id": "1467", + "$id": "1469", "kind": "number", "type": { "$ref": "224" @@ -10629,15 +10635,15 @@ } }, { - "$id": "1468", + "$id": "1470", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1469", + "$id": "1471", "timestamp": { - "$id": "1470", + "$id": "1472", "kind": "string", "type": { "$ref": "221" @@ -10645,7 +10651,7 @@ "value": "2017-01-01T13:55:00Z" }, "value": { - "$id": "1471", + "$id": "1473", "kind": "number", "type": { "$ref": "224" @@ -10655,15 +10661,15 @@ } }, { - "$id": "1472", + "$id": "1474", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1473", + "$id": "1475", "timestamp": { - "$id": "1474", + "$id": "1476", "kind": "string", "type": { "$ref": "221" @@ -10671,7 +10677,7 @@ "value": "2017-01-01T14:00:00Z" }, "value": { - "$id": "1475", + "$id": "1477", "kind": "number", "type": { "$ref": "224" @@ -10681,15 +10687,15 @@ } }, { - "$id": "1476", + "$id": "1478", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1477", + "$id": "1479", "timestamp": { - "$id": "1478", + "$id": "1480", "kind": "string", "type": { "$ref": "221" @@ -10697,7 +10703,7 @@ "value": "2017-01-01T14:05:00Z" }, "value": { - "$id": "1479", + "$id": "1481", "kind": "number", "type": { "$ref": "224" @@ -10707,15 +10713,15 @@ } }, { - "$id": "1480", + "$id": "1482", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1481", + "$id": "1483", "timestamp": { - "$id": "1482", + "$id": "1484", "kind": "string", "type": { "$ref": "221" @@ -10723,7 +10729,7 @@ "value": "2017-01-01T14:10:00Z" }, "value": { - "$id": "1483", + "$id": "1485", "kind": "number", "type": { "$ref": "224" @@ -10733,15 +10739,15 @@ } }, { - "$id": "1484", + "$id": "1486", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1485", + "$id": "1487", "timestamp": { - "$id": "1486", + "$id": "1488", "kind": "string", "type": { "$ref": "221" @@ -10749,7 +10755,7 @@ "value": "2017-01-01T14:15:00Z" }, "value": { - "$id": "1487", + "$id": "1489", "kind": "number", "type": { "$ref": "224" @@ -10759,15 +10765,15 @@ } }, { - "$id": "1488", + "$id": "1490", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1489", + "$id": "1491", "timestamp": { - "$id": "1490", + "$id": "1492", "kind": "string", "type": { "$ref": "221" @@ -10775,7 +10781,7 @@ "value": "2017-01-01T14:20:00Z" }, "value": { - "$id": "1491", + "$id": "1493", "kind": "number", "type": { "$ref": "224" @@ -10785,15 +10791,15 @@ } }, { - "$id": "1492", + "$id": "1494", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1493", + "$id": "1495", "timestamp": { - "$id": "1494", + "$id": "1496", "kind": "string", "type": { "$ref": "221" @@ -10801,7 +10807,7 @@ "value": "2017-01-01T14:25:00Z" }, "value": { - "$id": "1495", + "$id": "1497", "kind": "number", "type": { "$ref": "224" @@ -10811,15 +10817,15 @@ } }, { - "$id": "1496", + "$id": "1498", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1497", + "$id": "1499", "timestamp": { - "$id": "1498", + "$id": "1500", "kind": "string", "type": { "$ref": "221" @@ -10827,7 +10833,7 @@ "value": "2017-01-01T14:30:00Z" }, "value": { - "$id": "1499", + "$id": "1501", "kind": "number", "type": { "$ref": "224" @@ -10837,15 +10843,15 @@ } }, { - "$id": "1500", + "$id": "1502", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1501", + "$id": "1503", "timestamp": { - "$id": "1502", + "$id": "1504", "kind": "string", "type": { "$ref": "221" @@ -10853,7 +10859,7 @@ "value": "2017-01-01T14:35:00Z" }, "value": { - "$id": "1503", + "$id": "1505", "kind": "number", "type": { "$ref": "224" @@ -10863,15 +10869,15 @@ } }, { - "$id": "1504", + "$id": "1506", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1505", + "$id": "1507", "timestamp": { - "$id": "1506", + "$id": "1508", "kind": "string", "type": { "$ref": "221" @@ -10879,7 +10885,7 @@ "value": "2017-01-01T14:40:00Z" }, "value": { - "$id": "1507", + "$id": "1509", "kind": "number", "type": { "$ref": "224" @@ -10889,15 +10895,15 @@ } }, { - "$id": "1508", + "$id": "1510", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1509", + "$id": "1511", "timestamp": { - "$id": "1510", + "$id": "1512", "kind": "string", "type": { "$ref": "221" @@ -10905,7 +10911,7 @@ "value": "2017-01-01T14:45:00Z" }, "value": { - "$id": "1511", + "$id": "1513", "kind": "number", "type": { "$ref": "224" @@ -10915,15 +10921,15 @@ } }, { - "$id": "1512", + "$id": "1514", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1513", + "$id": "1515", "timestamp": { - "$id": "1514", + "$id": "1516", "kind": "string", "type": { "$ref": "221" @@ -10931,7 +10937,7 @@ "value": "2017-01-01T14:50:00Z" }, "value": { - "$id": "1515", + "$id": "1517", "kind": "number", "type": { "$ref": "224" @@ -10941,15 +10947,15 @@ } }, { - "$id": "1516", + "$id": "1518", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1517", + "$id": "1519", "timestamp": { - "$id": "1518", + "$id": "1520", "kind": "string", "type": { "$ref": "221" @@ -10957,7 +10963,7 @@ "value": "2017-01-01T14:55:00Z" }, "value": { - "$id": "1519", + "$id": "1521", "kind": "number", "type": { "$ref": "224" @@ -10967,15 +10973,15 @@ } }, { - "$id": "1520", + "$id": "1522", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1521", + "$id": "1523", "timestamp": { - "$id": "1522", + "$id": "1524", "kind": "string", "type": { "$ref": "221" @@ -10983,7 +10989,7 @@ "value": "2017-01-01T15:00:00Z" }, "value": { - "$id": "1523", + "$id": "1525", "kind": "number", "type": { "$ref": "224" @@ -10993,15 +10999,15 @@ } }, { - "$id": "1524", + "$id": "1526", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1525", + "$id": "1527", "timestamp": { - "$id": "1526", + "$id": "1528", "kind": "string", "type": { "$ref": "221" @@ -11009,7 +11015,7 @@ "value": "2017-01-01T15:05:00Z" }, "value": { - "$id": "1527", + "$id": "1529", "kind": "number", "type": { "$ref": "224" @@ -11019,15 +11025,15 @@ } }, { - "$id": "1528", + "$id": "1530", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1529", + "$id": "1531", "timestamp": { - "$id": "1530", + "$id": "1532", "kind": "string", "type": { "$ref": "221" @@ -11035,7 +11041,7 @@ "value": "2017-01-01T15:10:00Z" }, "value": { - "$id": "1531", + "$id": "1533", "kind": "number", "type": { "$ref": "224" @@ -11045,15 +11051,15 @@ } }, { - "$id": "1532", + "$id": "1534", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1533", + "$id": "1535", "timestamp": { - "$id": "1534", + "$id": "1536", "kind": "string", "type": { "$ref": "221" @@ -11061,7 +11067,7 @@ "value": "2017-01-01T15:15:00Z" }, "value": { - "$id": "1535", + "$id": "1537", "kind": "number", "type": { "$ref": "224" @@ -11071,15 +11077,15 @@ } }, { - "$id": "1536", + "$id": "1538", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1537", + "$id": "1539", "timestamp": { - "$id": "1538", + "$id": "1540", "kind": "string", "type": { "$ref": "221" @@ -11087,7 +11093,7 @@ "value": "2017-01-01T15:20:00Z" }, "value": { - "$id": "1539", + "$id": "1541", "kind": "number", "type": { "$ref": "224" @@ -11097,15 +11103,15 @@ } }, { - "$id": "1540", + "$id": "1542", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1541", + "$id": "1543", "timestamp": { - "$id": "1542", + "$id": "1544", "kind": "string", "type": { "$ref": "221" @@ -11113,7 +11119,7 @@ "value": "2017-01-01T15:25:00Z" }, "value": { - "$id": "1543", + "$id": "1545", "kind": "number", "type": { "$ref": "224" @@ -11123,15 +11129,15 @@ } }, { - "$id": "1544", + "$id": "1546", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1545", + "$id": "1547", "timestamp": { - "$id": "1546", + "$id": "1548", "kind": "string", "type": { "$ref": "221" @@ -11139,7 +11145,7 @@ "value": "2017-01-01T15:30:00Z" }, "value": { - "$id": "1547", + "$id": "1549", "kind": "number", "type": { "$ref": "224" @@ -11149,15 +11155,15 @@ } }, { - "$id": "1548", + "$id": "1550", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1549", + "$id": "1551", "timestamp": { - "$id": "1550", + "$id": "1552", "kind": "string", "type": { "$ref": "221" @@ -11165,7 +11171,7 @@ "value": "2017-01-01T15:35:00Z" }, "value": { - "$id": "1551", + "$id": "1553", "kind": "number", "type": { "$ref": "224" @@ -11175,15 +11181,15 @@ } }, { - "$id": "1552", + "$id": "1554", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1553", + "$id": "1555", "timestamp": { - "$id": "1554", + "$id": "1556", "kind": "string", "type": { "$ref": "221" @@ -11191,7 +11197,7 @@ "value": "2017-01-01T15:40:00Z" }, "value": { - "$id": "1555", + "$id": "1557", "kind": "number", "type": { "$ref": "224" @@ -11201,15 +11207,15 @@ } }, { - "$id": "1556", + "$id": "1558", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1557", + "$id": "1559", "timestamp": { - "$id": "1558", + "$id": "1560", "kind": "string", "type": { "$ref": "221" @@ -11217,7 +11223,7 @@ "value": "2017-01-01T15:45:00Z" }, "value": { - "$id": "1559", + "$id": "1561", "kind": "number", "type": { "$ref": "224" @@ -11227,15 +11233,15 @@ } }, { - "$id": "1560", + "$id": "1562", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1561", + "$id": "1563", "timestamp": { - "$id": "1562", + "$id": "1564", "kind": "string", "type": { "$ref": "221" @@ -11243,7 +11249,7 @@ "value": "2017-01-01T15:50:00Z" }, "value": { - "$id": "1563", + "$id": "1565", "kind": "number", "type": { "$ref": "224" @@ -11253,15 +11259,15 @@ } }, { - "$id": "1564", + "$id": "1566", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1565", + "$id": "1567", "timestamp": { - "$id": "1566", + "$id": "1568", "kind": "string", "type": { "$ref": "221" @@ -11269,7 +11275,7 @@ "value": "2017-01-01T15:55:00Z" }, "value": { - "$id": "1567", + "$id": "1569", "kind": "number", "type": { "$ref": "224" @@ -11279,15 +11285,15 @@ } }, { - "$id": "1568", + "$id": "1570", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1569", + "$id": "1571", "timestamp": { - "$id": "1570", + "$id": "1572", "kind": "string", "type": { "$ref": "221" @@ -11295,7 +11301,7 @@ "value": "2017-01-01T16:00:00Z" }, "value": { - "$id": "1571", + "$id": "1573", "kind": "number", "type": { "$ref": "224" @@ -11305,15 +11311,15 @@ } }, { - "$id": "1572", + "$id": "1574", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1573", + "$id": "1575", "timestamp": { - "$id": "1574", + "$id": "1576", "kind": "string", "type": { "$ref": "221" @@ -11321,7 +11327,7 @@ "value": "2017-01-01T16:05:00Z" }, "value": { - "$id": "1575", + "$id": "1577", "kind": "number", "type": { "$ref": "224" @@ -11331,15 +11337,15 @@ } }, { - "$id": "1576", + "$id": "1578", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1577", + "$id": "1579", "timestamp": { - "$id": "1578", + "$id": "1580", "kind": "string", "type": { "$ref": "221" @@ -11347,7 +11353,7 @@ "value": "2017-01-01T16:10:00Z" }, "value": { - "$id": "1579", + "$id": "1581", "kind": "number", "type": { "$ref": "224" @@ -11357,15 +11363,15 @@ } }, { - "$id": "1580", + "$id": "1582", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1581", + "$id": "1583", "timestamp": { - "$id": "1582", + "$id": "1584", "kind": "string", "type": { "$ref": "221" @@ -11373,7 +11379,7 @@ "value": "2017-01-01T16:15:00Z" }, "value": { - "$id": "1583", + "$id": "1585", "kind": "number", "type": { "$ref": "224" @@ -11383,15 +11389,15 @@ } }, { - "$id": "1584", + "$id": "1586", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1585", + "$id": "1587", "timestamp": { - "$id": "1586", + "$id": "1588", "kind": "string", "type": { "$ref": "221" @@ -11399,7 +11405,7 @@ "value": "2017-01-01T16:20:00Z" }, "value": { - "$id": "1587", + "$id": "1589", "kind": "number", "type": { "$ref": "224" @@ -11409,15 +11415,15 @@ } }, { - "$id": "1588", + "$id": "1590", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1589", + "$id": "1591", "timestamp": { - "$id": "1590", + "$id": "1592", "kind": "string", "type": { "$ref": "221" @@ -11425,7 +11431,7 @@ "value": "2017-01-01T16:25:00Z" }, "value": { - "$id": "1591", + "$id": "1593", "kind": "number", "type": { "$ref": "224" @@ -11435,15 +11441,15 @@ } }, { - "$id": "1592", + "$id": "1594", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1593", + "$id": "1595", "timestamp": { - "$id": "1594", + "$id": "1596", "kind": "string", "type": { "$ref": "221" @@ -11451,7 +11457,7 @@ "value": "2017-01-01T16:30:00Z" }, "value": { - "$id": "1595", + "$id": "1597", "kind": "number", "type": { "$ref": "224" @@ -11461,15 +11467,15 @@ } }, { - "$id": "1596", + "$id": "1598", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1597", + "$id": "1599", "timestamp": { - "$id": "1598", + "$id": "1600", "kind": "string", "type": { "$ref": "221" @@ -11477,7 +11483,7 @@ "value": "2017-01-01T16:35:00Z" }, "value": { - "$id": "1599", + "$id": "1601", "kind": "number", "type": { "$ref": "224" @@ -11487,15 +11493,15 @@ } }, { - "$id": "1600", + "$id": "1602", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1601", + "$id": "1603", "timestamp": { - "$id": "1602", + "$id": "1604", "kind": "string", "type": { "$ref": "221" @@ -11503,7 +11509,7 @@ "value": "2017-01-01T16:40:00Z" }, "value": { - "$id": "1603", + "$id": "1605", "kind": "number", "type": { "$ref": "224" @@ -11513,15 +11519,15 @@ } }, { - "$id": "1604", + "$id": "1606", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1605", + "$id": "1607", "timestamp": { - "$id": "1606", + "$id": "1608", "kind": "string", "type": { "$ref": "221" @@ -11529,7 +11535,7 @@ "value": "2017-01-01T16:45:00Z" }, "value": { - "$id": "1607", + "$id": "1609", "kind": "number", "type": { "$ref": "224" @@ -11539,15 +11545,15 @@ } }, { - "$id": "1608", + "$id": "1610", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1609", + "$id": "1611", "timestamp": { - "$id": "1610", + "$id": "1612", "kind": "string", "type": { "$ref": "221" @@ -11555,7 +11561,7 @@ "value": "2017-01-01T16:50:00Z" }, "value": { - "$id": "1611", + "$id": "1613", "kind": "number", "type": { "$ref": "224" @@ -11565,15 +11571,15 @@ } }, { - "$id": "1612", + "$id": "1614", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1613", + "$id": "1615", "timestamp": { - "$id": "1614", + "$id": "1616", "kind": "string", "type": { "$ref": "221" @@ -11581,7 +11587,7 @@ "value": "2017-01-01T16:55:00Z" }, "value": { - "$id": "1615", + "$id": "1617", "kind": "number", "type": { "$ref": "224" @@ -11591,15 +11597,15 @@ } }, { - "$id": "1616", + "$id": "1618", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1617", + "$id": "1619", "timestamp": { - "$id": "1618", + "$id": "1620", "kind": "string", "type": { "$ref": "221" @@ -11607,7 +11613,7 @@ "value": "2017-01-01T17:00:00Z" }, "value": { - "$id": "1619", + "$id": "1621", "kind": "number", "type": { "$ref": "224" @@ -11617,15 +11623,15 @@ } }, { - "$id": "1620", + "$id": "1622", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1621", + "$id": "1623", "timestamp": { - "$id": "1622", + "$id": "1624", "kind": "string", "type": { "$ref": "221" @@ -11633,7 +11639,7 @@ "value": "2017-01-01T17:05:00Z" }, "value": { - "$id": "1623", + "$id": "1625", "kind": "number", "type": { "$ref": "224" @@ -11643,15 +11649,15 @@ } }, { - "$id": "1624", + "$id": "1626", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1625", + "$id": "1627", "timestamp": { - "$id": "1626", + "$id": "1628", "kind": "string", "type": { "$ref": "221" @@ -11659,7 +11665,7 @@ "value": "2017-01-01T17:10:00Z" }, "value": { - "$id": "1627", + "$id": "1629", "kind": "number", "type": { "$ref": "224" @@ -11669,15 +11675,15 @@ } }, { - "$id": "1628", + "$id": "1630", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1629", + "$id": "1631", "timestamp": { - "$id": "1630", + "$id": "1632", "kind": "string", "type": { "$ref": "221" @@ -11685,7 +11691,7 @@ "value": "2017-01-01T17:15:00Z" }, "value": { - "$id": "1631", + "$id": "1633", "kind": "number", "type": { "$ref": "224" @@ -11695,15 +11701,15 @@ } }, { - "$id": "1632", + "$id": "1634", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1633", + "$id": "1635", "timestamp": { - "$id": "1634", + "$id": "1636", "kind": "string", "type": { "$ref": "221" @@ -11711,7 +11717,7 @@ "value": "2017-01-01T17:20:00Z" }, "value": { - "$id": "1635", + "$id": "1637", "kind": "number", "type": { "$ref": "224" @@ -11721,15 +11727,15 @@ } }, { - "$id": "1636", + "$id": "1638", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1637", + "$id": "1639", "timestamp": { - "$id": "1638", + "$id": "1640", "kind": "string", "type": { "$ref": "221" @@ -11737,7 +11743,7 @@ "value": "2017-01-01T17:25:00Z" }, "value": { - "$id": "1639", + "$id": "1641", "kind": "number", "type": { "$ref": "224" @@ -11747,15 +11753,15 @@ } }, { - "$id": "1640", + "$id": "1642", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1641", + "$id": "1643", "timestamp": { - "$id": "1642", + "$id": "1644", "kind": "string", "type": { "$ref": "221" @@ -11763,7 +11769,7 @@ "value": "2017-01-01T17:30:00Z" }, "value": { - "$id": "1643", + "$id": "1645", "kind": "number", "type": { "$ref": "224" @@ -11773,15 +11779,15 @@ } }, { - "$id": "1644", + "$id": "1646", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1645", + "$id": "1647", "timestamp": { - "$id": "1646", + "$id": "1648", "kind": "string", "type": { "$ref": "221" @@ -11789,7 +11795,7 @@ "value": "2017-01-01T17:35:00Z" }, "value": { - "$id": "1647", + "$id": "1649", "kind": "number", "type": { "$ref": "224" @@ -11799,15 +11805,15 @@ } }, { - "$id": "1648", + "$id": "1650", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1649", + "$id": "1651", "timestamp": { - "$id": "1650", + "$id": "1652", "kind": "string", "type": { "$ref": "221" @@ -11815,7 +11821,7 @@ "value": "2017-01-01T17:40:00Z" }, "value": { - "$id": "1651", + "$id": "1653", "kind": "number", "type": { "$ref": "224" @@ -11825,15 +11831,15 @@ } }, { - "$id": "1652", + "$id": "1654", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1653", + "$id": "1655", "timestamp": { - "$id": "1654", + "$id": "1656", "kind": "string", "type": { "$ref": "221" @@ -11841,7 +11847,7 @@ "value": "2017-01-01T17:45:00Z" }, "value": { - "$id": "1655", + "$id": "1657", "kind": "number", "type": { "$ref": "224" @@ -11851,15 +11857,15 @@ } }, { - "$id": "1656", + "$id": "1658", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1657", + "$id": "1659", "timestamp": { - "$id": "1658", + "$id": "1660", "kind": "string", "type": { "$ref": "221" @@ -11867,7 +11873,7 @@ "value": "2017-01-01T17:50:00Z" }, "value": { - "$id": "1659", + "$id": "1661", "kind": "number", "type": { "$ref": "224" @@ -11877,15 +11883,15 @@ } }, { - "$id": "1660", + "$id": "1662", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1661", + "$id": "1663", "timestamp": { - "$id": "1662", + "$id": "1664", "kind": "string", "type": { "$ref": "221" @@ -11893,7 +11899,7 @@ "value": "2017-01-01T17:55:00Z" }, "value": { - "$id": "1663", + "$id": "1665", "kind": "number", "type": { "$ref": "224" @@ -11903,15 +11909,15 @@ } }, { - "$id": "1664", + "$id": "1666", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1665", + "$id": "1667", "timestamp": { - "$id": "1666", + "$id": "1668", "kind": "string", "type": { "$ref": "221" @@ -11919,7 +11925,7 @@ "value": "2017-01-01T18:00:00Z" }, "value": { - "$id": "1667", + "$id": "1669", "kind": "number", "type": { "$ref": "224" @@ -11929,15 +11935,15 @@ } }, { - "$id": "1668", + "$id": "1670", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1669", + "$id": "1671", "timestamp": { - "$id": "1670", + "$id": "1672", "kind": "string", "type": { "$ref": "221" @@ -11945,7 +11951,7 @@ "value": "2017-01-01T18:05:00Z" }, "value": { - "$id": "1671", + "$id": "1673", "kind": "number", "type": { "$ref": "224" @@ -11955,15 +11961,15 @@ } }, { - "$id": "1672", + "$id": "1674", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1673", + "$id": "1675", "timestamp": { - "$id": "1674", + "$id": "1676", "kind": "string", "type": { "$ref": "221" @@ -11971,7 +11977,7 @@ "value": "2017-01-01T18:10:00Z" }, "value": { - "$id": "1675", + "$id": "1677", "kind": "number", "type": { "$ref": "224" @@ -11981,15 +11987,15 @@ } }, { - "$id": "1676", + "$id": "1678", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1677", + "$id": "1679", "timestamp": { - "$id": "1678", + "$id": "1680", "kind": "string", "type": { "$ref": "221" @@ -11997,7 +12003,7 @@ "value": "2017-01-01T18:15:00Z" }, "value": { - "$id": "1679", + "$id": "1681", "kind": "number", "type": { "$ref": "224" @@ -12007,15 +12013,15 @@ } }, { - "$id": "1680", + "$id": "1682", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1681", + "$id": "1683", "timestamp": { - "$id": "1682", + "$id": "1684", "kind": "string", "type": { "$ref": "221" @@ -12023,7 +12029,7 @@ "value": "2017-01-01T18:20:00Z" }, "value": { - "$id": "1683", + "$id": "1685", "kind": "number", "type": { "$ref": "224" @@ -12033,15 +12039,15 @@ } }, { - "$id": "1684", + "$id": "1686", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1685", + "$id": "1687", "timestamp": { - "$id": "1686", + "$id": "1688", "kind": "string", "type": { "$ref": "221" @@ -12049,7 +12055,7 @@ "value": "2017-01-01T18:25:00Z" }, "value": { - "$id": "1687", + "$id": "1689", "kind": "number", "type": { "$ref": "224" @@ -12059,15 +12065,15 @@ } }, { - "$id": "1688", + "$id": "1690", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1689", + "$id": "1691", "timestamp": { - "$id": "1690", + "$id": "1692", "kind": "string", "type": { "$ref": "221" @@ -12075,7 +12081,7 @@ "value": "2017-01-01T18:30:00Z" }, "value": { - "$id": "1691", + "$id": "1693", "kind": "number", "type": { "$ref": "224" @@ -12085,15 +12091,15 @@ } }, { - "$id": "1692", + "$id": "1694", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1693", + "$id": "1695", "timestamp": { - "$id": "1694", + "$id": "1696", "kind": "string", "type": { "$ref": "221" @@ -12101,7 +12107,7 @@ "value": "2017-01-01T18:35:00Z" }, "value": { - "$id": "1695", + "$id": "1697", "kind": "number", "type": { "$ref": "224" @@ -12111,15 +12117,15 @@ } }, { - "$id": "1696", + "$id": "1698", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1697", + "$id": "1699", "timestamp": { - "$id": "1698", + "$id": "1700", "kind": "string", "type": { "$ref": "221" @@ -12127,7 +12133,7 @@ "value": "2017-01-01T18:40:00Z" }, "value": { - "$id": "1699", + "$id": "1701", "kind": "number", "type": { "$ref": "224" @@ -12137,15 +12143,15 @@ } }, { - "$id": "1700", + "$id": "1702", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1701", + "$id": "1703", "timestamp": { - "$id": "1702", + "$id": "1704", "kind": "string", "type": { "$ref": "221" @@ -12153,7 +12159,7 @@ "value": "2017-01-01T18:45:00Z" }, "value": { - "$id": "1703", + "$id": "1705", "kind": "number", "type": { "$ref": "224" @@ -12163,15 +12169,15 @@ } }, { - "$id": "1704", + "$id": "1706", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1705", + "$id": "1707", "timestamp": { - "$id": "1706", + "$id": "1708", "kind": "string", "type": { "$ref": "221" @@ -12179,7 +12185,7 @@ "value": "2017-01-01T18:50:00Z" }, "value": { - "$id": "1707", + "$id": "1709", "kind": "number", "type": { "$ref": "224" @@ -12189,15 +12195,15 @@ } }, { - "$id": "1708", + "$id": "1710", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1709", + "$id": "1711", "timestamp": { - "$id": "1710", + "$id": "1712", "kind": "string", "type": { "$ref": "221" @@ -12205,7 +12211,7 @@ "value": "2017-01-01T18:55:00Z" }, "value": { - "$id": "1711", + "$id": "1713", "kind": "number", "type": { "$ref": "224" @@ -12215,15 +12221,15 @@ } }, { - "$id": "1712", + "$id": "1714", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1713", + "$id": "1715", "timestamp": { - "$id": "1714", + "$id": "1716", "kind": "string", "type": { "$ref": "221" @@ -12231,7 +12237,7 @@ "value": "2017-01-01T19:00:00Z" }, "value": { - "$id": "1715", + "$id": "1717", "kind": "number", "type": { "$ref": "224" @@ -12241,15 +12247,15 @@ } }, { - "$id": "1716", + "$id": "1718", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1717", + "$id": "1719", "timestamp": { - "$id": "1718", + "$id": "1720", "kind": "string", "type": { "$ref": "221" @@ -12257,7 +12263,7 @@ "value": "2017-01-01T19:05:00Z" }, "value": { - "$id": "1719", + "$id": "1721", "kind": "number", "type": { "$ref": "224" @@ -12267,15 +12273,15 @@ } }, { - "$id": "1720", + "$id": "1722", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1721", + "$id": "1723", "timestamp": { - "$id": "1722", + "$id": "1724", "kind": "string", "type": { "$ref": "221" @@ -12283,7 +12289,7 @@ "value": "2017-01-01T19:10:00Z" }, "value": { - "$id": "1723", + "$id": "1725", "kind": "number", "type": { "$ref": "224" @@ -12293,15 +12299,15 @@ } }, { - "$id": "1724", + "$id": "1726", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1725", + "$id": "1727", "timestamp": { - "$id": "1726", + "$id": "1728", "kind": "string", "type": { "$ref": "221" @@ -12309,7 +12315,7 @@ "value": "2017-01-01T19:15:00Z" }, "value": { - "$id": "1727", + "$id": "1729", "kind": "number", "type": { "$ref": "224" @@ -12319,15 +12325,15 @@ } }, { - "$id": "1728", + "$id": "1730", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1729", + "$id": "1731", "timestamp": { - "$id": "1730", + "$id": "1732", "kind": "string", "type": { "$ref": "221" @@ -12335,7 +12341,7 @@ "value": "2017-01-01T19:20:00Z" }, "value": { - "$id": "1731", + "$id": "1733", "kind": "number", "type": { "$ref": "224" @@ -12345,15 +12351,15 @@ } }, { - "$id": "1732", + "$id": "1734", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1733", + "$id": "1735", "timestamp": { - "$id": "1734", + "$id": "1736", "kind": "string", "type": { "$ref": "221" @@ -12361,7 +12367,7 @@ "value": "2017-01-01T19:25:00Z" }, "value": { - "$id": "1735", + "$id": "1737", "kind": "number", "type": { "$ref": "224" @@ -12371,15 +12377,15 @@ } }, { - "$id": "1736", + "$id": "1738", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1737", + "$id": "1739", "timestamp": { - "$id": "1738", + "$id": "1740", "kind": "string", "type": { "$ref": "221" @@ -12387,7 +12393,7 @@ "value": "2017-01-01T19:30:00Z" }, "value": { - "$id": "1739", + "$id": "1741", "kind": "number", "type": { "$ref": "224" @@ -12397,15 +12403,15 @@ } }, { - "$id": "1740", + "$id": "1742", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1741", + "$id": "1743", "timestamp": { - "$id": "1742", + "$id": "1744", "kind": "string", "type": { "$ref": "221" @@ -12413,7 +12419,7 @@ "value": "2017-01-01T19:35:00Z" }, "value": { - "$id": "1743", + "$id": "1745", "kind": "number", "type": { "$ref": "224" @@ -12423,15 +12429,15 @@ } }, { - "$id": "1744", + "$id": "1746", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1745", + "$id": "1747", "timestamp": { - "$id": "1746", + "$id": "1748", "kind": "string", "type": { "$ref": "221" @@ -12439,7 +12445,7 @@ "value": "2017-01-01T19:40:00Z" }, "value": { - "$id": "1747", + "$id": "1749", "kind": "number", "type": { "$ref": "224" @@ -12449,15 +12455,15 @@ } }, { - "$id": "1748", + "$id": "1750", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1749", + "$id": "1751", "timestamp": { - "$id": "1750", + "$id": "1752", "kind": "string", "type": { "$ref": "221" @@ -12465,7 +12471,7 @@ "value": "2017-01-01T19:45:00Z" }, "value": { - "$id": "1751", + "$id": "1753", "kind": "number", "type": { "$ref": "224" @@ -12475,15 +12481,15 @@ } }, { - "$id": "1752", + "$id": "1754", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1753", + "$id": "1755", "timestamp": { - "$id": "1754", + "$id": "1756", "kind": "string", "type": { "$ref": "221" @@ -12491,7 +12497,7 @@ "value": "2017-01-01T19:50:00Z" }, "value": { - "$id": "1755", + "$id": "1757", "kind": "number", "type": { "$ref": "224" @@ -12501,15 +12507,15 @@ } }, { - "$id": "1756", + "$id": "1758", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1757", + "$id": "1759", "timestamp": { - "$id": "1758", + "$id": "1760", "kind": "string", "type": { "$ref": "221" @@ -12517,7 +12523,7 @@ "value": "2017-01-01T19:55:00Z" }, "value": { - "$id": "1759", + "$id": "1761", "kind": "number", "type": { "$ref": "224" @@ -12527,15 +12533,15 @@ } }, { - "$id": "1760", + "$id": "1762", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1761", + "$id": "1763", "timestamp": { - "$id": "1762", + "$id": "1764", "kind": "string", "type": { "$ref": "221" @@ -12543,7 +12549,7 @@ "value": "2017-01-01T20:00:00Z" }, "value": { - "$id": "1763", + "$id": "1765", "kind": "number", "type": { "$ref": "224" @@ -12553,15 +12559,15 @@ } }, { - "$id": "1764", + "$id": "1766", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1765", + "$id": "1767", "timestamp": { - "$id": "1766", + "$id": "1768", "kind": "string", "type": { "$ref": "221" @@ -12569,7 +12575,7 @@ "value": "2017-01-01T20:05:00Z" }, "value": { - "$id": "1767", + "$id": "1769", "kind": "number", "type": { "$ref": "224" @@ -12579,15 +12585,15 @@ } }, { - "$id": "1768", + "$id": "1770", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1769", + "$id": "1771", "timestamp": { - "$id": "1770", + "$id": "1772", "kind": "string", "type": { "$ref": "221" @@ -12595,7 +12601,7 @@ "value": "2017-01-01T20:10:00Z" }, "value": { - "$id": "1771", + "$id": "1773", "kind": "number", "type": { "$ref": "224" @@ -12605,15 +12611,15 @@ } }, { - "$id": "1772", + "$id": "1774", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1773", + "$id": "1775", "timestamp": { - "$id": "1774", + "$id": "1776", "kind": "string", "type": { "$ref": "221" @@ -12621,7 +12627,7 @@ "value": "2017-01-01T20:15:00Z" }, "value": { - "$id": "1775", + "$id": "1777", "kind": "number", "type": { "$ref": "224" @@ -12631,15 +12637,15 @@ } }, { - "$id": "1776", + "$id": "1778", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1777", + "$id": "1779", "timestamp": { - "$id": "1778", + "$id": "1780", "kind": "string", "type": { "$ref": "221" @@ -12647,7 +12653,7 @@ "value": "2017-01-01T20:20:00Z" }, "value": { - "$id": "1779", + "$id": "1781", "kind": "number", "type": { "$ref": "224" @@ -12657,15 +12663,15 @@ } }, { - "$id": "1780", + "$id": "1782", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1781", + "$id": "1783", "timestamp": { - "$id": "1782", + "$id": "1784", "kind": "string", "type": { "$ref": "221" @@ -12673,7 +12679,7 @@ "value": "2017-01-01T20:25:00Z" }, "value": { - "$id": "1783", + "$id": "1785", "kind": "number", "type": { "$ref": "224" @@ -12683,15 +12689,15 @@ } }, { - "$id": "1784", + "$id": "1786", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1785", + "$id": "1787", "timestamp": { - "$id": "1786", + "$id": "1788", "kind": "string", "type": { "$ref": "221" @@ -12699,7 +12705,7 @@ "value": "2017-01-01T20:30:00Z" }, "value": { - "$id": "1787", + "$id": "1789", "kind": "number", "type": { "$ref": "224" @@ -12709,15 +12715,15 @@ } }, { - "$id": "1788", + "$id": "1790", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1789", + "$id": "1791", "timestamp": { - "$id": "1790", + "$id": "1792", "kind": "string", "type": { "$ref": "221" @@ -12725,7 +12731,7 @@ "value": "2017-01-01T20:35:00Z" }, "value": { - "$id": "1791", + "$id": "1793", "kind": "number", "type": { "$ref": "224" @@ -12735,15 +12741,15 @@ } }, { - "$id": "1792", + "$id": "1794", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1793", + "$id": "1795", "timestamp": { - "$id": "1794", + "$id": "1796", "kind": "string", "type": { "$ref": "221" @@ -12751,7 +12757,7 @@ "value": "2017-01-01T20:40:00Z" }, "value": { - "$id": "1795", + "$id": "1797", "kind": "number", "type": { "$ref": "224" @@ -12761,15 +12767,15 @@ } }, { - "$id": "1796", + "$id": "1798", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1797", + "$id": "1799", "timestamp": { - "$id": "1798", + "$id": "1800", "kind": "string", "type": { "$ref": "221" @@ -12777,7 +12783,7 @@ "value": "2017-01-01T20:45:00Z" }, "value": { - "$id": "1799", + "$id": "1801", "kind": "number", "type": { "$ref": "224" @@ -12787,15 +12793,15 @@ } }, { - "$id": "1800", + "$id": "1802", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1801", + "$id": "1803", "timestamp": { - "$id": "1802", + "$id": "1804", "kind": "string", "type": { "$ref": "221" @@ -12803,7 +12809,7 @@ "value": "2017-01-01T20:50:00Z" }, "value": { - "$id": "1803", + "$id": "1805", "kind": "number", "type": { "$ref": "224" @@ -12813,15 +12819,15 @@ } }, { - "$id": "1804", + "$id": "1806", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1805", + "$id": "1807", "timestamp": { - "$id": "1806", + "$id": "1808", "kind": "string", "type": { "$ref": "221" @@ -12829,7 +12835,7 @@ "value": "2017-01-01T20:55:00Z" }, "value": { - "$id": "1807", + "$id": "1809", "kind": "number", "type": { "$ref": "224" @@ -12839,15 +12845,15 @@ } }, { - "$id": "1808", + "$id": "1810", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1809", + "$id": "1811", "timestamp": { - "$id": "1810", + "$id": "1812", "kind": "string", "type": { "$ref": "221" @@ -12855,7 +12861,7 @@ "value": "2017-01-01T21:00:00Z" }, "value": { - "$id": "1811", + "$id": "1813", "kind": "number", "type": { "$ref": "224" @@ -12865,15 +12871,15 @@ } }, { - "$id": "1812", + "$id": "1814", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1813", + "$id": "1815", "timestamp": { - "$id": "1814", + "$id": "1816", "kind": "string", "type": { "$ref": "221" @@ -12881,7 +12887,7 @@ "value": "2017-01-01T21:05:00Z" }, "value": { - "$id": "1815", + "$id": "1817", "kind": "number", "type": { "$ref": "224" @@ -12891,15 +12897,15 @@ } }, { - "$id": "1816", + "$id": "1818", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1817", + "$id": "1819", "timestamp": { - "$id": "1818", + "$id": "1820", "kind": "string", "type": { "$ref": "221" @@ -12907,7 +12913,7 @@ "value": "2017-01-01T21:10:00Z" }, "value": { - "$id": "1819", + "$id": "1821", "kind": "number", "type": { "$ref": "224" @@ -12917,15 +12923,15 @@ } }, { - "$id": "1820", + "$id": "1822", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1821", + "$id": "1823", "timestamp": { - "$id": "1822", + "$id": "1824", "kind": "string", "type": { "$ref": "221" @@ -12933,7 +12939,7 @@ "value": "2017-01-01T21:15:00Z" }, "value": { - "$id": "1823", + "$id": "1825", "kind": "number", "type": { "$ref": "224" @@ -12943,15 +12949,15 @@ } }, { - "$id": "1824", + "$id": "1826", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1825", + "$id": "1827", "timestamp": { - "$id": "1826", + "$id": "1828", "kind": "string", "type": { "$ref": "221" @@ -12959,7 +12965,7 @@ "value": "2017-01-01T21:20:00Z" }, "value": { - "$id": "1827", + "$id": "1829", "kind": "number", "type": { "$ref": "224" @@ -12969,15 +12975,15 @@ } }, { - "$id": "1828", + "$id": "1830", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1829", + "$id": "1831", "timestamp": { - "$id": "1830", + "$id": "1832", "kind": "string", "type": { "$ref": "221" @@ -12985,7 +12991,7 @@ "value": "2017-01-01T21:25:00Z" }, "value": { - "$id": "1831", + "$id": "1833", "kind": "number", "type": { "$ref": "224" @@ -12995,15 +13001,15 @@ } }, { - "$id": "1832", + "$id": "1834", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1833", + "$id": "1835", "timestamp": { - "$id": "1834", + "$id": "1836", "kind": "string", "type": { "$ref": "221" @@ -13011,7 +13017,7 @@ "value": "2017-01-01T21:30:00Z" }, "value": { - "$id": "1835", + "$id": "1837", "kind": "number", "type": { "$ref": "224" @@ -13021,15 +13027,15 @@ } }, { - "$id": "1836", + "$id": "1838", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1837", + "$id": "1839", "timestamp": { - "$id": "1838", + "$id": "1840", "kind": "string", "type": { "$ref": "221" @@ -13037,7 +13043,7 @@ "value": "2017-01-01T21:35:00Z" }, "value": { - "$id": "1839", + "$id": "1841", "kind": "number", "type": { "$ref": "224" @@ -13047,15 +13053,15 @@ } }, { - "$id": "1840", + "$id": "1842", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1841", + "$id": "1843", "timestamp": { - "$id": "1842", + "$id": "1844", "kind": "string", "type": { "$ref": "221" @@ -13063,7 +13069,7 @@ "value": "2017-01-01T21:40:00Z" }, "value": { - "$id": "1843", + "$id": "1845", "kind": "number", "type": { "$ref": "224" @@ -13073,15 +13079,15 @@ } }, { - "$id": "1844", + "$id": "1846", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1845", + "$id": "1847", "timestamp": { - "$id": "1846", + "$id": "1848", "kind": "string", "type": { "$ref": "221" @@ -13089,7 +13095,7 @@ "value": "2017-01-01T21:45:00Z" }, "value": { - "$id": "1847", + "$id": "1849", "kind": "number", "type": { "$ref": "224" @@ -13099,15 +13105,15 @@ } }, { - "$id": "1848", + "$id": "1850", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1849", + "$id": "1851", "timestamp": { - "$id": "1850", + "$id": "1852", "kind": "string", "type": { "$ref": "221" @@ -13115,7 +13121,7 @@ "value": "2017-01-01T21:50:00Z" }, "value": { - "$id": "1851", + "$id": "1853", "kind": "number", "type": { "$ref": "224" @@ -13125,15 +13131,15 @@ } }, { - "$id": "1852", + "$id": "1854", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1853", + "$id": "1855", "timestamp": { - "$id": "1854", + "$id": "1856", "kind": "string", "type": { "$ref": "221" @@ -13141,7 +13147,7 @@ "value": "2017-01-01T21:55:00Z" }, "value": { - "$id": "1855", + "$id": "1857", "kind": "number", "type": { "$ref": "224" @@ -13151,15 +13157,15 @@ } }, { - "$id": "1856", + "$id": "1858", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1857", + "$id": "1859", "timestamp": { - "$id": "1858", + "$id": "1860", "kind": "string", "type": { "$ref": "221" @@ -13167,7 +13173,7 @@ "value": "2017-01-01T22:00:00Z" }, "value": { - "$id": "1859", + "$id": "1861", "kind": "number", "type": { "$ref": "224" @@ -13177,15 +13183,15 @@ } }, { - "$id": "1860", + "$id": "1862", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1861", + "$id": "1863", "timestamp": { - "$id": "1862", + "$id": "1864", "kind": "string", "type": { "$ref": "221" @@ -13193,7 +13199,7 @@ "value": "2017-01-01T22:05:00Z" }, "value": { - "$id": "1863", + "$id": "1865", "kind": "number", "type": { "$ref": "224" @@ -13203,15 +13209,15 @@ } }, { - "$id": "1864", + "$id": "1866", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1865", + "$id": "1867", "timestamp": { - "$id": "1866", + "$id": "1868", "kind": "string", "type": { "$ref": "221" @@ -13219,7 +13225,7 @@ "value": "2017-01-01T22:10:00Z" }, "value": { - "$id": "1867", + "$id": "1869", "kind": "number", "type": { "$ref": "224" @@ -13229,15 +13235,15 @@ } }, { - "$id": "1868", + "$id": "1870", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1869", + "$id": "1871", "timestamp": { - "$id": "1870", + "$id": "1872", "kind": "string", "type": { "$ref": "221" @@ -13245,7 +13251,7 @@ "value": "2017-01-01T22:15:00Z" }, "value": { - "$id": "1871", + "$id": "1873", "kind": "number", "type": { "$ref": "224" @@ -13255,15 +13261,15 @@ } }, { - "$id": "1872", + "$id": "1874", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1873", + "$id": "1875", "timestamp": { - "$id": "1874", + "$id": "1876", "kind": "string", "type": { "$ref": "221" @@ -13271,7 +13277,7 @@ "value": "2017-01-01T22:20:00Z" }, "value": { - "$id": "1875", + "$id": "1877", "kind": "number", "type": { "$ref": "224" @@ -13281,15 +13287,15 @@ } }, { - "$id": "1876", + "$id": "1878", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1877", + "$id": "1879", "timestamp": { - "$id": "1878", + "$id": "1880", "kind": "string", "type": { "$ref": "221" @@ -13297,7 +13303,7 @@ "value": "2017-01-01T22:25:00Z" }, "value": { - "$id": "1879", + "$id": "1881", "kind": "number", "type": { "$ref": "224" @@ -13307,15 +13313,15 @@ } }, { - "$id": "1880", + "$id": "1882", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1881", + "$id": "1883", "timestamp": { - "$id": "1882", + "$id": "1884", "kind": "string", "type": { "$ref": "221" @@ -13323,7 +13329,7 @@ "value": "2017-01-01T22:30:00Z" }, "value": { - "$id": "1883", + "$id": "1885", "kind": "number", "type": { "$ref": "224" @@ -13333,15 +13339,15 @@ } }, { - "$id": "1884", + "$id": "1886", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1885", + "$id": "1887", "timestamp": { - "$id": "1886", + "$id": "1888", "kind": "string", "type": { "$ref": "221" @@ -13349,7 +13355,7 @@ "value": "2017-01-01T22:35:00Z" }, "value": { - "$id": "1887", + "$id": "1889", "kind": "number", "type": { "$ref": "224" @@ -13359,15 +13365,15 @@ } }, { - "$id": "1888", + "$id": "1890", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1889", + "$id": "1891", "timestamp": { - "$id": "1890", + "$id": "1892", "kind": "string", "type": { "$ref": "221" @@ -13375,7 +13381,7 @@ "value": "2017-01-01T22:40:00Z" }, "value": { - "$id": "1891", + "$id": "1893", "kind": "number", "type": { "$ref": "224" @@ -13385,15 +13391,15 @@ } }, { - "$id": "1892", + "$id": "1894", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1893", + "$id": "1895", "timestamp": { - "$id": "1894", + "$id": "1896", "kind": "string", "type": { "$ref": "221" @@ -13401,7 +13407,7 @@ "value": "2017-01-01T22:45:00Z" }, "value": { - "$id": "1895", + "$id": "1897", "kind": "number", "type": { "$ref": "224" @@ -13411,15 +13417,15 @@ } }, { - "$id": "1896", + "$id": "1898", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1897", + "$id": "1899", "timestamp": { - "$id": "1898", + "$id": "1900", "kind": "string", "type": { "$ref": "221" @@ -13427,7 +13433,7 @@ "value": "2017-01-01T22:50:00Z" }, "value": { - "$id": "1899", + "$id": "1901", "kind": "number", "type": { "$ref": "224" @@ -13437,15 +13443,15 @@ } }, { - "$id": "1900", + "$id": "1902", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1901", + "$id": "1903", "timestamp": { - "$id": "1902", + "$id": "1904", "kind": "string", "type": { "$ref": "221" @@ -13453,7 +13459,7 @@ "value": "2017-01-01T22:55:00Z" }, "value": { - "$id": "1903", + "$id": "1905", "kind": "number", "type": { "$ref": "224" @@ -13463,15 +13469,15 @@ } }, { - "$id": "1904", + "$id": "1906", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1905", + "$id": "1907", "timestamp": { - "$id": "1906", + "$id": "1908", "kind": "string", "type": { "$ref": "221" @@ -13479,7 +13485,7 @@ "value": "2017-01-01T23:00:00Z" }, "value": { - "$id": "1907", + "$id": "1909", "kind": "number", "type": { "$ref": "224" @@ -13489,15 +13495,15 @@ } }, { - "$id": "1908", + "$id": "1910", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1909", + "$id": "1911", "timestamp": { - "$id": "1910", + "$id": "1912", "kind": "string", "type": { "$ref": "221" @@ -13505,7 +13511,7 @@ "value": "2017-01-01T23:05:00Z" }, "value": { - "$id": "1911", + "$id": "1913", "kind": "number", "type": { "$ref": "224" @@ -13515,15 +13521,15 @@ } }, { - "$id": "1912", + "$id": "1914", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1913", + "$id": "1915", "timestamp": { - "$id": "1914", + "$id": "1916", "kind": "string", "type": { "$ref": "221" @@ -13531,7 +13537,7 @@ "value": "2017-01-01T23:10:00Z" }, "value": { - "$id": "1915", + "$id": "1917", "kind": "number", "type": { "$ref": "224" @@ -13541,15 +13547,15 @@ } }, { - "$id": "1916", + "$id": "1918", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1917", + "$id": "1919", "timestamp": { - "$id": "1918", + "$id": "1920", "kind": "string", "type": { "$ref": "221" @@ -13557,7 +13563,7 @@ "value": "2017-01-01T23:15:00Z" }, "value": { - "$id": "1919", + "$id": "1921", "kind": "number", "type": { "$ref": "224" @@ -13567,15 +13573,15 @@ } }, { - "$id": "1920", + "$id": "1922", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1921", + "$id": "1923", "timestamp": { - "$id": "1922", + "$id": "1924", "kind": "string", "type": { "$ref": "221" @@ -13583,7 +13589,7 @@ "value": "2017-01-01T23:20:00Z" }, "value": { - "$id": "1923", + "$id": "1925", "kind": "number", "type": { "$ref": "224" @@ -13593,15 +13599,15 @@ } }, { - "$id": "1924", + "$id": "1926", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1925", + "$id": "1927", "timestamp": { - "$id": "1926", + "$id": "1928", "kind": "string", "type": { "$ref": "221" @@ -13609,7 +13615,7 @@ "value": "2017-01-01T23:25:00Z" }, "value": { - "$id": "1927", + "$id": "1929", "kind": "number", "type": { "$ref": "224" @@ -13619,15 +13625,15 @@ } }, { - "$id": "1928", + "$id": "1930", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1929", + "$id": "1931", "timestamp": { - "$id": "1930", + "$id": "1932", "kind": "string", "type": { "$ref": "221" @@ -13635,7 +13641,7 @@ "value": "2017-01-01T23:30:00Z" }, "value": { - "$id": "1931", + "$id": "1933", "kind": "number", "type": { "$ref": "224" @@ -13645,15 +13651,15 @@ } }, { - "$id": "1932", + "$id": "1934", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1933", + "$id": "1935", "timestamp": { - "$id": "1934", + "$id": "1936", "kind": "string", "type": { "$ref": "221" @@ -13661,7 +13667,7 @@ "value": "2017-01-01T23:35:00Z" }, "value": { - "$id": "1935", + "$id": "1937", "kind": "number", "type": { "$ref": "224" @@ -13671,15 +13677,15 @@ } }, { - "$id": "1936", + "$id": "1938", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1937", + "$id": "1939", "timestamp": { - "$id": "1938", + "$id": "1940", "kind": "string", "type": { "$ref": "221" @@ -13687,7 +13693,7 @@ "value": "2017-01-01T23:40:00Z" }, "value": { - "$id": "1939", + "$id": "1941", "kind": "number", "type": { "$ref": "224" @@ -13697,15 +13703,15 @@ } }, { - "$id": "1940", + "$id": "1942", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1941", + "$id": "1943", "timestamp": { - "$id": "1942", + "$id": "1944", "kind": "string", "type": { "$ref": "221" @@ -13713,7 +13719,7 @@ "value": "2017-01-01T23:45:00Z" }, "value": { - "$id": "1943", + "$id": "1945", "kind": "number", "type": { "$ref": "224" @@ -13723,15 +13729,15 @@ } }, { - "$id": "1944", + "$id": "1946", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1945", + "$id": "1947", "timestamp": { - "$id": "1946", + "$id": "1948", "kind": "string", "type": { "$ref": "221" @@ -13739,7 +13745,7 @@ "value": "2017-01-01T23:50:00Z" }, "value": { - "$id": "1947", + "$id": "1949", "kind": "number", "type": { "$ref": "224" @@ -13749,15 +13755,15 @@ } }, { - "$id": "1948", + "$id": "1950", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1949", + "$id": "1951", "timestamp": { - "$id": "1950", + "$id": "1952", "kind": "string", "type": { "$ref": "221" @@ -13765,7 +13771,7 @@ "value": "2017-01-01T23:55:00Z" }, "value": { - "$id": "1951", + "$id": "1953", "kind": "number", "type": { "$ref": "224" @@ -13775,15 +13781,15 @@ } }, { - "$id": "1952", + "$id": "1954", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1953", + "$id": "1955", "timestamp": { - "$id": "1954", + "$id": "1956", "kind": "string", "type": { "$ref": "221" @@ -13791,7 +13797,7 @@ "value": "2017-01-02T00:00:00Z" }, "value": { - "$id": "1955", + "$id": "1957", "kind": "number", "type": { "$ref": "224" @@ -13801,15 +13807,15 @@ } }, { - "$id": "1956", + "$id": "1958", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1957", + "$id": "1959", "timestamp": { - "$id": "1958", + "$id": "1960", "kind": "string", "type": { "$ref": "221" @@ -13817,7 +13823,7 @@ "value": "2017-01-02T00:05:00Z" }, "value": { - "$id": "1959", + "$id": "1961", "kind": "number", "type": { "$ref": "224" @@ -13827,15 +13833,15 @@ } }, { - "$id": "1960", + "$id": "1962", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1961", + "$id": "1963", "timestamp": { - "$id": "1962", + "$id": "1964", "kind": "string", "type": { "$ref": "221" @@ -13843,7 +13849,7 @@ "value": "2017-01-02T00:10:00Z" }, "value": { - "$id": "1963", + "$id": "1965", "kind": "number", "type": { "$ref": "224" @@ -13853,15 +13859,15 @@ } }, { - "$id": "1964", + "$id": "1966", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1965", + "$id": "1967", "timestamp": { - "$id": "1966", + "$id": "1968", "kind": "string", "type": { "$ref": "221" @@ -13869,7 +13875,7 @@ "value": "2017-01-02T00:15:00Z" }, "value": { - "$id": "1967", + "$id": "1969", "kind": "number", "type": { "$ref": "224" @@ -13879,15 +13885,15 @@ } }, { - "$id": "1968", + "$id": "1970", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1969", + "$id": "1971", "timestamp": { - "$id": "1970", + "$id": "1972", "kind": "string", "type": { "$ref": "221" @@ -13895,7 +13901,7 @@ "value": "2017-01-02T00:20:00Z" }, "value": { - "$id": "1971", + "$id": "1973", "kind": "number", "type": { "$ref": "224" @@ -13905,15 +13911,15 @@ } }, { - "$id": "1972", + "$id": "1974", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1973", + "$id": "1975", "timestamp": { - "$id": "1974", + "$id": "1976", "kind": "string", "type": { "$ref": "221" @@ -13921,7 +13927,7 @@ "value": "2017-01-02T00:25:00Z" }, "value": { - "$id": "1975", + "$id": "1977", "kind": "number", "type": { "$ref": "224" @@ -13931,15 +13937,15 @@ } }, { - "$id": "1976", + "$id": "1978", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1977", + "$id": "1979", "timestamp": { - "$id": "1978", + "$id": "1980", "kind": "string", "type": { "$ref": "221" @@ -13947,7 +13953,7 @@ "value": "2017-01-02T00:30:00Z" }, "value": { - "$id": "1979", + "$id": "1981", "kind": "number", "type": { "$ref": "224" @@ -13957,15 +13963,15 @@ } }, { - "$id": "1980", + "$id": "1982", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1981", + "$id": "1983", "timestamp": { - "$id": "1982", + "$id": "1984", "kind": "string", "type": { "$ref": "221" @@ -13973,7 +13979,7 @@ "value": "2017-01-02T00:35:00Z" }, "value": { - "$id": "1983", + "$id": "1985", "kind": "number", "type": { "$ref": "224" @@ -13983,15 +13989,15 @@ } }, { - "$id": "1984", + "$id": "1986", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1985", + "$id": "1987", "timestamp": { - "$id": "1986", + "$id": "1988", "kind": "string", "type": { "$ref": "221" @@ -13999,7 +14005,7 @@ "value": "2017-01-02T00:40:00Z" }, "value": { - "$id": "1987", + "$id": "1989", "kind": "number", "type": { "$ref": "224" @@ -14009,15 +14015,15 @@ } }, { - "$id": "1988", + "$id": "1990", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1989", + "$id": "1991", "timestamp": { - "$id": "1990", + "$id": "1992", "kind": "string", "type": { "$ref": "221" @@ -14025,7 +14031,7 @@ "value": "2017-01-02T00:45:00Z" }, "value": { - "$id": "1991", + "$id": "1993", "kind": "number", "type": { "$ref": "224" @@ -14035,15 +14041,15 @@ } }, { - "$id": "1992", + "$id": "1994", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1993", + "$id": "1995", "timestamp": { - "$id": "1994", + "$id": "1996", "kind": "string", "type": { "$ref": "221" @@ -14051,7 +14057,7 @@ "value": "2017-01-02T00:50:00Z" }, "value": { - "$id": "1995", + "$id": "1997", "kind": "number", "type": { "$ref": "224" @@ -14061,15 +14067,15 @@ } }, { - "$id": "1996", + "$id": "1998", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "1997", + "$id": "1999", "timestamp": { - "$id": "1998", + "$id": "2000", "kind": "string", "type": { "$ref": "221" @@ -14077,7 +14083,7 @@ "value": "2017-01-02T00:55:00Z" }, "value": { - "$id": "1999", + "$id": "2001", "kind": "number", "type": { "$ref": "224" @@ -14087,15 +14093,15 @@ } }, { - "$id": "2000", + "$id": "2002", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2001", + "$id": "2003", "timestamp": { - "$id": "2002", + "$id": "2004", "kind": "string", "type": { "$ref": "221" @@ -14103,7 +14109,7 @@ "value": "2017-01-02T01:00:00Z" }, "value": { - "$id": "2003", + "$id": "2005", "kind": "number", "type": { "$ref": "224" @@ -14113,15 +14119,15 @@ } }, { - "$id": "2004", + "$id": "2006", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2005", + "$id": "2007", "timestamp": { - "$id": "2006", + "$id": "2008", "kind": "string", "type": { "$ref": "221" @@ -14129,7 +14135,7 @@ "value": "2017-01-02T01:05:00Z" }, "value": { - "$id": "2007", + "$id": "2009", "kind": "number", "type": { "$ref": "224" @@ -14139,15 +14145,15 @@ } }, { - "$id": "2008", + "$id": "2010", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2009", + "$id": "2011", "timestamp": { - "$id": "2010", + "$id": "2012", "kind": "string", "type": { "$ref": "221" @@ -14155,7 +14161,7 @@ "value": "2017-01-02T01:10:00Z" }, "value": { - "$id": "2011", + "$id": "2013", "kind": "number", "type": { "$ref": "224" @@ -14165,15 +14171,15 @@ } }, { - "$id": "2012", + "$id": "2014", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2013", + "$id": "2015", "timestamp": { - "$id": "2014", + "$id": "2016", "kind": "string", "type": { "$ref": "221" @@ -14181,7 +14187,7 @@ "value": "2017-01-02T01:15:00Z" }, "value": { - "$id": "2015", + "$id": "2017", "kind": "number", "type": { "$ref": "224" @@ -14191,15 +14197,15 @@ } }, { - "$id": "2016", + "$id": "2018", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2017", + "$id": "2019", "timestamp": { - "$id": "2018", + "$id": "2020", "kind": "string", "type": { "$ref": "221" @@ -14207,7 +14213,7 @@ "value": "2017-01-02T01:20:00Z" }, "value": { - "$id": "2019", + "$id": "2021", "kind": "number", "type": { "$ref": "224" @@ -14217,15 +14223,15 @@ } }, { - "$id": "2020", + "$id": "2022", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2021", + "$id": "2023", "timestamp": { - "$id": "2022", + "$id": "2024", "kind": "string", "type": { "$ref": "221" @@ -14233,7 +14239,7 @@ "value": "2017-01-02T01:25:00Z" }, "value": { - "$id": "2023", + "$id": "2025", "kind": "number", "type": { "$ref": "224" @@ -14243,15 +14249,15 @@ } }, { - "$id": "2024", + "$id": "2026", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2025", + "$id": "2027", "timestamp": { - "$id": "2026", + "$id": "2028", "kind": "string", "type": { "$ref": "221" @@ -14259,7 +14265,7 @@ "value": "2017-01-02T01:30:00Z" }, "value": { - "$id": "2027", + "$id": "2029", "kind": "number", "type": { "$ref": "224" @@ -14269,15 +14275,15 @@ } }, { - "$id": "2028", + "$id": "2030", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2029", + "$id": "2031", "timestamp": { - "$id": "2030", + "$id": "2032", "kind": "string", "type": { "$ref": "221" @@ -14285,7 +14291,7 @@ "value": "2017-01-02T01:35:00Z" }, "value": { - "$id": "2031", + "$id": "2033", "kind": "number", "type": { "$ref": "224" @@ -14295,15 +14301,15 @@ } }, { - "$id": "2032", + "$id": "2034", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2033", + "$id": "2035", "timestamp": { - "$id": "2034", + "$id": "2036", "kind": "string", "type": { "$ref": "221" @@ -14311,7 +14317,7 @@ "value": "2017-01-02T01:40:00Z" }, "value": { - "$id": "2035", + "$id": "2037", "kind": "number", "type": { "$ref": "224" @@ -14321,15 +14327,15 @@ } }, { - "$id": "2036", + "$id": "2038", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2037", + "$id": "2039", "timestamp": { - "$id": "2038", + "$id": "2040", "kind": "string", "type": { "$ref": "221" @@ -14337,7 +14343,7 @@ "value": "2017-01-02T01:45:00Z" }, "value": { - "$id": "2039", + "$id": "2041", "kind": "number", "type": { "$ref": "224" @@ -14347,15 +14353,15 @@ } }, { - "$id": "2040", + "$id": "2042", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2041", + "$id": "2043", "timestamp": { - "$id": "2042", + "$id": "2044", "kind": "string", "type": { "$ref": "221" @@ -14363,7 +14369,7 @@ "value": "2017-01-02T01:50:00Z" }, "value": { - "$id": "2043", + "$id": "2045", "kind": "number", "type": { "$ref": "224" @@ -14373,15 +14379,15 @@ } }, { - "$id": "2044", + "$id": "2046", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2045", + "$id": "2047", "timestamp": { - "$id": "2046", + "$id": "2048", "kind": "string", "type": { "$ref": "221" @@ -14389,7 +14395,7 @@ "value": "2017-01-02T01:55:00Z" }, "value": { - "$id": "2047", + "$id": "2049", "kind": "number", "type": { "$ref": "224" @@ -14399,15 +14405,15 @@ } }, { - "$id": "2048", + "$id": "2050", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2049", + "$id": "2051", "timestamp": { - "$id": "2050", + "$id": "2052", "kind": "string", "type": { "$ref": "221" @@ -14415,7 +14421,7 @@ "value": "2017-01-02T02:00:00Z" }, "value": { - "$id": "2051", + "$id": "2053", "kind": "number", "type": { "$ref": "224" @@ -14425,15 +14431,15 @@ } }, { - "$id": "2052", + "$id": "2054", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2053", + "$id": "2055", "timestamp": { - "$id": "2054", + "$id": "2056", "kind": "string", "type": { "$ref": "221" @@ -14441,7 +14447,7 @@ "value": "2017-01-02T02:05:00Z" }, "value": { - "$id": "2055", + "$id": "2057", "kind": "number", "type": { "$ref": "224" @@ -14451,15 +14457,15 @@ } }, { - "$id": "2056", + "$id": "2058", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2057", + "$id": "2059", "timestamp": { - "$id": "2058", + "$id": "2060", "kind": "string", "type": { "$ref": "221" @@ -14467,7 +14473,7 @@ "value": "2017-01-02T02:10:00Z" }, "value": { - "$id": "2059", + "$id": "2061", "kind": "number", "type": { "$ref": "224" @@ -14477,15 +14483,15 @@ } }, { - "$id": "2060", + "$id": "2062", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2061", + "$id": "2063", "timestamp": { - "$id": "2062", + "$id": "2064", "kind": "string", "type": { "$ref": "221" @@ -14493,7 +14499,7 @@ "value": "2017-01-02T02:15:00Z" }, "value": { - "$id": "2063", + "$id": "2065", "kind": "number", "type": { "$ref": "224" @@ -14503,15 +14509,15 @@ } }, { - "$id": "2064", + "$id": "2066", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2065", + "$id": "2067", "timestamp": { - "$id": "2066", + "$id": "2068", "kind": "string", "type": { "$ref": "221" @@ -14519,7 +14525,7 @@ "value": "2017-01-02T02:20:00Z" }, "value": { - "$id": "2067", + "$id": "2069", "kind": "number", "type": { "$ref": "224" @@ -14529,15 +14535,15 @@ } }, { - "$id": "2068", + "$id": "2070", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2069", + "$id": "2071", "timestamp": { - "$id": "2070", + "$id": "2072", "kind": "string", "type": { "$ref": "221" @@ -14545,7 +14551,7 @@ "value": "2017-01-02T02:25:00Z" }, "value": { - "$id": "2071", + "$id": "2073", "kind": "number", "type": { "$ref": "224" @@ -14555,15 +14561,15 @@ } }, { - "$id": "2072", + "$id": "2074", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2073", + "$id": "2075", "timestamp": { - "$id": "2074", + "$id": "2076", "kind": "string", "type": { "$ref": "221" @@ -14571,7 +14577,7 @@ "value": "2017-01-02T02:30:00Z" }, "value": { - "$id": "2075", + "$id": "2077", "kind": "number", "type": { "$ref": "224" @@ -14581,15 +14587,15 @@ } }, { - "$id": "2076", + "$id": "2078", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2077", + "$id": "2079", "timestamp": { - "$id": "2078", + "$id": "2080", "kind": "string", "type": { "$ref": "221" @@ -14597,7 +14603,7 @@ "value": "2017-01-02T02:35:00Z" }, "value": { - "$id": "2079", + "$id": "2081", "kind": "number", "type": { "$ref": "224" @@ -14607,15 +14613,15 @@ } }, { - "$id": "2080", + "$id": "2082", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2081", + "$id": "2083", "timestamp": { - "$id": "2082", + "$id": "2084", "kind": "string", "type": { "$ref": "221" @@ -14623,7 +14629,7 @@ "value": "2017-01-02T02:40:00Z" }, "value": { - "$id": "2083", + "$id": "2085", "kind": "number", "type": { "$ref": "224" @@ -14633,15 +14639,15 @@ } }, { - "$id": "2084", + "$id": "2086", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2085", + "$id": "2087", "timestamp": { - "$id": "2086", + "$id": "2088", "kind": "string", "type": { "$ref": "221" @@ -14649,7 +14655,7 @@ "value": "2017-01-02T02:45:00Z" }, "value": { - "$id": "2087", + "$id": "2089", "kind": "number", "type": { "$ref": "224" @@ -14659,15 +14665,15 @@ } }, { - "$id": "2088", + "$id": "2090", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2089", + "$id": "2091", "timestamp": { - "$id": "2090", + "$id": "2092", "kind": "string", "type": { "$ref": "221" @@ -14675,7 +14681,7 @@ "value": "2017-01-02T02:50:00Z" }, "value": { - "$id": "2091", + "$id": "2093", "kind": "number", "type": { "$ref": "224" @@ -14685,15 +14691,15 @@ } }, { - "$id": "2092", + "$id": "2094", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2093", + "$id": "2095", "timestamp": { - "$id": "2094", + "$id": "2096", "kind": "string", "type": { "$ref": "221" @@ -14701,7 +14707,7 @@ "value": "2017-01-02T02:55:00Z" }, "value": { - "$id": "2095", + "$id": "2097", "kind": "number", "type": { "$ref": "224" @@ -14711,15 +14717,15 @@ } }, { - "$id": "2096", + "$id": "2098", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2097", + "$id": "2099", "timestamp": { - "$id": "2098", + "$id": "2100", "kind": "string", "type": { "$ref": "221" @@ -14727,7 +14733,7 @@ "value": "2017-01-02T03:00:00Z" }, "value": { - "$id": "2099", + "$id": "2101", "kind": "number", "type": { "$ref": "224" @@ -14737,15 +14743,15 @@ } }, { - "$id": "2100", + "$id": "2102", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2101", + "$id": "2103", "timestamp": { - "$id": "2102", + "$id": "2104", "kind": "string", "type": { "$ref": "221" @@ -14753,7 +14759,7 @@ "value": "2017-01-02T03:05:00Z" }, "value": { - "$id": "2103", + "$id": "2105", "kind": "number", "type": { "$ref": "224" @@ -14763,15 +14769,15 @@ } }, { - "$id": "2104", + "$id": "2106", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2105", + "$id": "2107", "timestamp": { - "$id": "2106", + "$id": "2108", "kind": "string", "type": { "$ref": "221" @@ -14779,7 +14785,7 @@ "value": "2017-01-02T03:10:00Z" }, "value": { - "$id": "2107", + "$id": "2109", "kind": "number", "type": { "$ref": "224" @@ -14789,15 +14795,15 @@ } }, { - "$id": "2108", + "$id": "2110", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2109", + "$id": "2111", "timestamp": { - "$id": "2110", + "$id": "2112", "kind": "string", "type": { "$ref": "221" @@ -14805,7 +14811,7 @@ "value": "2017-01-02T03:15:00Z" }, "value": { - "$id": "2111", + "$id": "2113", "kind": "number", "type": { "$ref": "224" @@ -14815,15 +14821,15 @@ } }, { - "$id": "2112", + "$id": "2114", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2113", + "$id": "2115", "timestamp": { - "$id": "2114", + "$id": "2116", "kind": "string", "type": { "$ref": "221" @@ -14831,7 +14837,7 @@ "value": "2017-01-02T03:20:00Z" }, "value": { - "$id": "2115", + "$id": "2117", "kind": "number", "type": { "$ref": "224" @@ -14841,15 +14847,15 @@ } }, { - "$id": "2116", + "$id": "2118", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2117", + "$id": "2119", "timestamp": { - "$id": "2118", + "$id": "2120", "kind": "string", "type": { "$ref": "221" @@ -14857,7 +14863,7 @@ "value": "2017-01-02T03:25:00Z" }, "value": { - "$id": "2119", + "$id": "2121", "kind": "number", "type": { "$ref": "224" @@ -14867,15 +14873,15 @@ } }, { - "$id": "2120", + "$id": "2122", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2121", + "$id": "2123", "timestamp": { - "$id": "2122", + "$id": "2124", "kind": "string", "type": { "$ref": "221" @@ -14883,7 +14889,7 @@ "value": "2017-01-02T03:30:00Z" }, "value": { - "$id": "2123", + "$id": "2125", "kind": "number", "type": { "$ref": "224" @@ -14893,15 +14899,15 @@ } }, { - "$id": "2124", + "$id": "2126", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2125", + "$id": "2127", "timestamp": { - "$id": "2126", + "$id": "2128", "kind": "string", "type": { "$ref": "221" @@ -14909,7 +14915,7 @@ "value": "2017-01-02T03:35:00Z" }, "value": { - "$id": "2127", + "$id": "2129", "kind": "number", "type": { "$ref": "224" @@ -14919,15 +14925,15 @@ } }, { - "$id": "2128", + "$id": "2130", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2129", + "$id": "2131", "timestamp": { - "$id": "2130", + "$id": "2132", "kind": "string", "type": { "$ref": "221" @@ -14935,7 +14941,7 @@ "value": "2017-01-02T03:40:00Z" }, "value": { - "$id": "2131", + "$id": "2133", "kind": "number", "type": { "$ref": "224" @@ -14945,15 +14951,15 @@ } }, { - "$id": "2132", + "$id": "2134", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2133", + "$id": "2135", "timestamp": { - "$id": "2134", + "$id": "2136", "kind": "string", "type": { "$ref": "221" @@ -14961,7 +14967,7 @@ "value": "2017-01-02T03:45:00Z" }, "value": { - "$id": "2135", + "$id": "2137", "kind": "number", "type": { "$ref": "224" @@ -14971,15 +14977,15 @@ } }, { - "$id": "2136", + "$id": "2138", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2137", + "$id": "2139", "timestamp": { - "$id": "2138", + "$id": "2140", "kind": "string", "type": { "$ref": "221" @@ -14987,7 +14993,7 @@ "value": "2017-01-02T03:50:00Z" }, "value": { - "$id": "2139", + "$id": "2141", "kind": "number", "type": { "$ref": "224" @@ -14997,15 +15003,15 @@ } }, { - "$id": "2140", + "$id": "2142", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2141", + "$id": "2143", "timestamp": { - "$id": "2142", + "$id": "2144", "kind": "string", "type": { "$ref": "221" @@ -15013,7 +15019,7 @@ "value": "2017-01-02T03:55:00Z" }, "value": { - "$id": "2143", + "$id": "2145", "kind": "number", "type": { "$ref": "224" @@ -15023,15 +15029,15 @@ } }, { - "$id": "2144", + "$id": "2146", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2145", + "$id": "2147", "timestamp": { - "$id": "2146", + "$id": "2148", "kind": "string", "type": { "$ref": "221" @@ -15039,7 +15045,7 @@ "value": "2017-01-02T04:00:00Z" }, "value": { - "$id": "2147", + "$id": "2149", "kind": "number", "type": { "$ref": "224" @@ -15049,15 +15055,15 @@ } }, { - "$id": "2148", + "$id": "2150", "kind": "model", "type": { "$ref": "219" }, "value": { - "$id": "2149", + "$id": "2151", "timestamp": { - "$id": "2150", + "$id": "2152", "kind": "string", "type": { "$ref": "221" @@ -15065,7 +15071,7 @@ "value": "2017-01-02T04:05:00Z" }, "value": { - "$id": "2151", + "$id": "2153", "kind": "number", "type": { "$ref": "224" @@ -15077,7 +15083,7 @@ ] }, "granularity": { - "$id": "2152", + "$id": "2154", "kind": "string", "type": { "$ref": "29" @@ -15085,7 +15091,7 @@ "value": "minutely" }, "customInterval": { - "$id": "2153", + "$id": "2155", "kind": "number", "type": { "$ref": "289" @@ -15093,7 +15099,7 @@ "value": 5 }, "stableTrendWindow": { - "$id": "2154", + "$id": "2156", "kind": "number", "type": { "$ref": "293" @@ -15101,7 +15107,7 @@ "value": 10 }, "threshold": { - "$id": "2155", + "$id": "2157", "kind": "number", "type": { "$ref": "295" @@ -15109,7 +15115,7 @@ "value": 0.99 }, "period": { - "$id": "2156", + "$id": "2158", "kind": "number", "type": { "$ref": "291" @@ -15119,13 +15125,16 @@ } } } - ] + ], + "responses": { + "$id": "2159" + } } ] } ], "Protocol": { - "$id": "2157" + "$id": "2160" }, "Parent": "AnomalyDetectorClient", "Parameters": [ @@ -15139,11 +15148,11 @@ "Decorators": [] }, { - "$id": "2158", + "$id": "2161", "Name": "Multivariate", "Operations": [ { - "$id": "2159", + "$id": "2162", "Name": "GetMultivariateBatchDetectionResult", "ResourceName": "Multivariate", "Summary": "Get Multivariate Anomaly Detection Result", @@ -15151,12 +15160,12 @@ "Accessibility": "public", "Parameters": [ { - "$id": "2160", + "$id": "2163", "Name": "Endpoint", "NameInRequest": "Endpoint", "Description": "Supported Cognitive Services endpoints (protocol and hostname, for example:\nhttps://westus2.api.cognitive.microsoft.com).", "Type": { - "$id": "2161", + "$id": "2164", "Kind": "url", "Name": "url", "CrossLanguageDefinitionId": "TypeSpec.url" @@ -15172,7 +15181,7 @@ "Kind": "Client" }, { - "$id": "2162", + "$id": "2165", "Name": "ApiVersion", "NameInRequest": "ApiVersion", "Description": "Api Version", @@ -15189,9 +15198,9 @@ "Explode": false, "Kind": "Client", "DefaultValue": { - "$id": "2163", + "$id": "2166", "Type": { - "$id": "2164", + "$id": "2167", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string" @@ -15200,17 +15209,17 @@ } }, { - "$id": "2165", + "$id": "2168", "Name": "resultId", "NameInRequest": "resultId", "Description": "ID of a batch detection result.", "Type": { - "$id": "2166", + "$id": "2169", "Kind": "string", "Name": "uuid", "CrossLanguageDefinitionId": "Azure.Core.uuid", "BaseType": { - "$id": "2167", + "$id": "2170", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -15228,14 +15237,14 @@ "Decorators": [] }, { - "$id": "2168", + "$id": "2171", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "2169", + "$id": "2172", "Kind": "constant", "ValueType": { - "$id": "2170", + "$id": "2173", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -15256,7 +15265,7 @@ ], "Responses": [ { - "$id": "2171", + "$id": "2174", "StatusCodes": [ 200 ], @@ -15282,39 +15291,39 @@ "Decorators": [], "Examples": [ { - "$id": "2172", + "$id": "2175", "kind": "http", "name": "Get multivariate batch detection result", "description": "Get multivariate batch detection result", "filePath": "v1.1/GetResult.json", "rawExample": { - "$id": "2173", + "$id": "2176", "operationId": "Multivariate_GetMultivariateBatchDetectionResult", "title": "Get multivariate batch detection result", "parameters": { - "$id": "2174", + "$id": "2177", "Endpoint": "{Endpoint}", "ApiVersion": "v1.1", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "resultId": "663884e6-b117-11ea-b3de-0242ac130004", "body": { - "$id": "2175" + "$id": "2178" } }, "responses": { "200": { - "$id": "2177", + "$id": "2180", "body": { - "$id": "2178", + "$id": "2181", "resultId": "663884e6-b117-11ea-b3de-0242ac130004", "summary": { - "$id": "2179", + "$id": "2182", "status": "READY", "errors": [], "variableStates": [ { - "$id": "2180", + "$id": "2183", "variable": "variable_1", "filledNARatio": 0, "effectiveCount": 30, @@ -15322,7 +15331,7 @@ "lastTimestamp": "2021-01-01T00:29:00Z" }, { - "$id": "2181", + "$id": "2184", "variable": "variable_2", "filledNARatio": 0, "effectiveCount": 30, @@ -15330,7 +15339,7 @@ "lastTimestamp": "2021-01-01T00:29:00Z" }, { - "$id": "2182", + "$id": "2185", "variable": "variable_3", "filledNARatio": 0, "effectiveCount": 30, @@ -15339,7 +15348,7 @@ } ], "setupInfo": { - "$id": "2183", + "$id": "2186", "dataSource": "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", "topContributorCount": 10, "startTime": "2021-01-01T00:00:00Z", @@ -15348,10 +15357,10 @@ }, "results": [ { - "$id": "2184", + "$id": "2187", "timestamp": "2021-01-01T00:28:00Z", "value": { - "$id": "2185", + "$id": "2188", "isAnomaly": false, "severity": 0, "score": 0.6928471326828003 @@ -15359,20 +15368,20 @@ "errors": [] }, { - "$id": "2186", + "$id": "2189", "timestamp": "2021-01-01T00:29:00Z", "value": { - "$id": "2187", + "$id": "2190", "isAnomaly": true, "severity": 0.5337404608726501, "score": 0.9171165823936462, "interpretation": [ { - "$id": "2188", + "$id": "2191", "variable": "variable_2", "contributionScore": 0.5371576215, "correlationChanges": { - "$id": "2189", + "$id": "2192", "changedVariables": [ "variable_1", "variable_3" @@ -15380,22 +15389,22 @@ } }, { - "$id": "2190", + "$id": "2193", "variable": "variable_3", "contributionScore": 0.3324159383, "correlationChanges": { - "$id": "2191", + "$id": "2194", "changedVariables": [ "variable_2" ] } }, { - "$id": "2192", + "$id": "2195", "variable": "variable_1", "contributionScore": 0.1304264402, "correlationChanges": { - "$id": "2193", + "$id": "2196", "changedVariables": [] } } @@ -15405,16 +15414,16 @@ ] } }, - "$id": "2176", + "$id": "2179", "default": { - "$id": "2194", + "$id": "2197", "headers": { - "$id": "2195", + "$id": "2198", "Content-Type": "application/json", "x-ms-error-code": "Error Code" }, "body": { - "$id": "2196", + "$id": "2199", "code": "Error Code", "message": "Error Message" } @@ -15423,25 +15432,28 @@ }, "parameters": [ { - "$id": "2197", + "$id": "2200", "parameter": { - "$ref": "2165" + "$ref": "2168" }, "value": { - "$id": "2198", + "$id": "2201", "kind": "string", "type": { - "$ref": "2166" + "$ref": "2169" }, "value": "663884e6-b117-11ea-b3de-0242ac130004" } } - ] + ], + "responses": { + "$id": "2202" + } } ] }, { - "$id": "2199", + "$id": "2203", "Name": "TrainMultivariateModel", "ResourceName": "Multivariate", "Summary": "Train a Multivariate Anomaly Detection Model", @@ -15449,21 +15461,21 @@ "Accessibility": "public", "Parameters": [ { - "$ref": "2160" + "$ref": "2163" }, { - "$ref": "2162" + "$ref": "2165" }, { - "$id": "2200", + "$id": "2204", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "2201", + "$id": "2205", "Kind": "constant", "ValueType": { - "$id": "2202", + "$id": "2206", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -15482,14 +15494,14 @@ "Decorators": [] }, { - "$id": "2203", + "$id": "2207", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "2204", + "$id": "2208", "Kind": "constant", "ValueType": { - "$id": "2205", + "$id": "2209", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -15508,7 +15520,7 @@ "Decorators": [] }, { - "$id": "2206", + "$id": "2210", "Name": "modelInfo", "NameInRequest": "modelInfo", "Description": "Model information.", @@ -15527,7 +15539,7 @@ ], "Responses": [ { - "$id": "2207", + "$id": "2211", "StatusCodes": [ 201 ], @@ -15537,12 +15549,12 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "2208", + "$id": "2212", "Name": "Location", "NameInResponse": "location", "Description": "Location and ID of the model.", "Type": { - "$id": "2209", + "$id": "2213", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -15570,26 +15582,26 @@ "Decorators": [], "Examples": [ { - "$id": "2210", + "$id": "2214", "kind": "http", "name": "Create and train multivariate model", "description": "Create and train multivariate model", "filePath": "v1.1/TrainModel.json", "rawExample": { - "$id": "2211", + "$id": "2215", "operationId": "Multivariate_TrainMultivariateModel", "title": "Create and train multivariate model", "parameters": { - "$id": "2212", + "$id": "2216", "Endpoint": "{Endpoint}", "ApiVersion": "v1.1", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "modelInfo": { - "$id": "2213", + "$id": "2217", "slidingWindow": 20, "alignPolicy": { - "$id": "2214", + "$id": "2218", "alignMode": "Outer", "fillNAMethod": "Linear", "paddingValue": 0 @@ -15603,21 +15615,21 @@ }, "responses": { "201": { - "$id": "2216", + "$id": "2220", "headers": { - "$id": "2217", + "$id": "2221", "Location": "{Endpoint}/anomalydetector/v1.1/multivariate/models/{modelId}" }, "body": { - "$id": "2218", + "$id": "2222", "modelId": "45aad126-aafd-11ea-b8fb-d89ef3400c5f", "createdTime": "2020-06-30T00:00:00Z", "lastUpdatedTime": "2020-06-30T00:00:00Z", "modelInfo": { - "$id": "2219", + "$id": "2223", "slidingWindow": 20, "alignPolicy": { - "$id": "2220", + "$id": "2224", "alignMode": "Outer", "fillNAMethod": "Linear", "paddingValue": 0 @@ -15632,16 +15644,16 @@ } } }, - "$id": "2215", + "$id": "2219", "default": { - "$id": "2221", + "$id": "2225", "headers": { - "$id": "2222", + "$id": "2226", "Content-Type": "application/json", "x-ms-error-code": "Error Code" }, "body": { - "$id": "2223", + "$id": "2227", "code": "Error Code", "message": "Error Message" } @@ -15650,20 +15662,20 @@ }, "parameters": [ { - "$id": "2224", + "$id": "2228", "parameter": { - "$ref": "2206" + "$ref": "2210" }, "value": { - "$id": "2225", + "$id": "2229", "kind": "model", "type": { "$ref": "136" }, "value": { - "$id": "2226", + "$id": "2230", "slidingWindow": { - "$id": "2227", + "$id": "2231", "kind": "number", "type": { "$ref": "149" @@ -15671,15 +15683,15 @@ "value": 20 }, "alignPolicy": { - "$id": "2228", + "$id": "2232", "kind": "model", "type": { "$ref": "151" }, "value": { - "$id": "2229", + "$id": "2233", "alignMode": { - "$id": "2230", + "$id": "2234", "kind": "string", "type": { "$ref": "12" @@ -15687,7 +15699,7 @@ "value": "Outer" }, "fillNAMethod": { - "$id": "2231", + "$id": "2235", "kind": "string", "type": { "$ref": "16" @@ -15695,7 +15707,7 @@ "value": "Linear" }, "paddingValue": { - "$id": "2232", + "$id": "2236", "kind": "number", "type": { "$ref": "155" @@ -15705,7 +15717,7 @@ } }, "dataSource": { - "$id": "2233", + "$id": "2237", "kind": "string", "type": { "$ref": "138" @@ -15713,7 +15725,7 @@ "value": "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv" }, "dataSchema": { - "$id": "2234", + "$id": "2238", "kind": "string", "type": { "$ref": "8" @@ -15721,7 +15733,7 @@ "value": "OneTable" }, "startTime": { - "$id": "2235", + "$id": "2239", "kind": "string", "type": { "$ref": "141" @@ -15729,7 +15741,7 @@ "value": "2019-04-01T00:00:00Z" }, "endTime": { - "$id": "2236", + "$id": "2240", "kind": "string", "type": { "$ref": "144" @@ -15737,7 +15749,7 @@ "value": "2019-04-02T00:00:00Z" }, "displayName": { - "$id": "2237", + "$id": "2241", "kind": "string", "type": { "$ref": "147" @@ -15747,12 +15759,15 @@ } } } - ] + ], + "responses": { + "$id": "2242" + } } ] }, { - "$id": "2238", + "$id": "2243", "Name": "ListMultivariateModels", "ResourceName": "Multivariate", "Summary": "List Multivariate Models", @@ -15760,18 +15775,18 @@ "Accessibility": "public", "Parameters": [ { - "$ref": "2160" + "$ref": "2163" }, { - "$ref": "2162" + "$ref": "2165" }, { - "$id": "2239", + "$id": "2244", "Name": "skip", "NameInRequest": "skip", "Description": "Skip indicates how many models will be skipped.", "Type": { - "$id": "2240", + "$id": "2245", "Kind": "int32", "Name": "int32", "CrossLanguageDefinitionId": "TypeSpec.int32", @@ -15787,12 +15802,12 @@ "Decorators": [] }, { - "$id": "2241", + "$id": "2246", "Name": "top", "NameInRequest": "top", "Description": "Top indicates how many models will be fetched.", "Type": { - "$id": "2242", + "$id": "2247", "Kind": "int32", "Name": "int32", "CrossLanguageDefinitionId": "TypeSpec.int32", @@ -15808,14 +15823,14 @@ "Decorators": [] }, { - "$id": "2243", + "$id": "2248", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "2244", + "$id": "2249", "Kind": "constant", "ValueType": { - "$id": "2245", + "$id": "2250", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -15836,7 +15851,7 @@ ], "Responses": [ { - "$id": "2246", + "$id": "2251", "StatusCodes": [ 200 ], @@ -15857,7 +15872,7 @@ "Path": "/multivariate/models", "BufferResponse": true, "Paging": { - "$id": "2247", + "$id": "2252", "ItemName": "models", "NextLinkName": "nextLink" }, @@ -15867,17 +15882,17 @@ "Decorators": [], "Examples": [ { - "$id": "2248", + "$id": "2253", "kind": "http", "name": "List multivariate models", "description": "List multivariate models", "filePath": "v1.1/ListModel.json", "rawExample": { - "$id": "2249", + "$id": "2254", "operationId": "Multivariate_ListMultivariateModels", "title": "List multivariate models", "parameters": { - "$id": "2250", + "$id": "2255", "Endpoint": "{Endpoint}", "ApiVersion": "v1.1", "Content-Type": "application/json", @@ -15885,25 +15900,25 @@ "skip": 0, "top": 10, "body": { - "$id": "2251" + "$id": "2256" } }, "responses": { "200": { - "$id": "2253", + "$id": "2258", "body": { - "$id": "2254", + "$id": "2259", "models": [ { - "$id": "2255", + "$id": "2260", "modelId": "45aad126-aafd-11ea-b8fb-d89ef3400c5f", "createdTime": "2020-06-30T00:00:00Z", "lastUpdatedTime": "2020-06-30T00:00:00Z", "modelInfo": { - "$id": "2256", + "$id": "2261", "slidingWindow": 20, "alignPolicy": { - "$id": "2257", + "$id": "2262", "alignMode": "Outer", "fillNAMethod": "Linear", "paddingValue": 0 @@ -15916,9 +15931,9 @@ "status": "READY", "errors": [], "diagnosticsInfo": { - "$id": "2258", + "$id": "2263", "modelState": { - "$id": "2259", + "$id": "2264", "epochIds": [ 10, 20, @@ -15970,7 +15985,7 @@ }, "variableStates": [ { - "$id": "2260", + "$id": "2265", "variable": "ad_input", "filledNARatio": 0, "effectiveCount": 1441, @@ -15978,7 +15993,7 @@ "lastTimestamp": "2019-04-02T00:00:00Z" }, { - "$id": "2261", + "$id": "2266", "variable": "ad_ontimer_output", "filledNARatio": 0, "effectiveCount": 1441, @@ -15986,7 +16001,7 @@ "lastTimestamp": "2019-04-02T00:00:00Z" }, { - "$id": "2262", + "$id": "2267", "variable": "ingestion", "filledNARatio": 0, "effectiveCount": 1441, @@ -15994,7 +16009,7 @@ "lastTimestamp": "2019-04-02T00:00:00Z" }, { - "$id": "2263", + "$id": "2268", "variable": "data_in_speed", "filledNARatio": 0, "effectiveCount": 1441, @@ -16002,7 +16017,7 @@ "lastTimestamp": "2019-04-02T00:00:00Z" }, { - "$id": "2264", + "$id": "2269", "variable": "cpu", "filledNARatio": 0, "effectiveCount": 1441, @@ -16010,7 +16025,7 @@ "lastTimestamp": "2019-04-02T00:00:00Z" }, { - "$id": "2265", + "$id": "2270", "variable": "ad_series_init", "filledNARatio": 0, "effectiveCount": 1441, @@ -16018,7 +16033,7 @@ "lastTimestamp": "2019-04-02T00:00:00Z" }, { - "$id": "2266", + "$id": "2271", "variable": "flink_last_ckpt_duration", "filledNARatio": 0, "effectiveCount": 1441, @@ -16026,7 +16041,7 @@ "lastTimestamp": "2019-04-02T00:00:00Z" }, { - "$id": "2267", + "$id": "2272", "variable": "data_out_speed", "filledNARatio": 0, "effectiveCount": 1441, @@ -16034,7 +16049,7 @@ "lastTimestamp": "2019-04-02T00:00:00Z" }, { - "$id": "2268", + "$id": "2273", "variable": "ad_output", "filledNARatio": 0, "effectiveCount": 1441, @@ -16051,16 +16066,16 @@ "nextLink": "" } }, - "$id": "2252", + "$id": "2257", "default": { - "$id": "2269", + "$id": "2274", "headers": { - "$id": "2270", + "$id": "2275", "Content-Type": "application/json", "x-ms-error-code": "Error Code" }, "body": { - "$id": "2271", + "$id": "2276", "code": "Error Code", "message": "Error Message" } @@ -16069,39 +16084,42 @@ }, "parameters": [ { - "$id": "2272", + "$id": "2277", "parameter": { - "$ref": "2239" + "$ref": "2244" }, "value": { - "$id": "2273", + "$id": "2278", "kind": "number", "type": { - "$ref": "2240" + "$ref": "2245" }, "value": 0 } }, { - "$id": "2274", + "$id": "2279", "parameter": { - "$ref": "2241" + "$ref": "2246" }, "value": { - "$id": "2275", + "$id": "2280", "kind": "number", "type": { - "$ref": "2242" + "$ref": "2247" }, "value": 10 } } - ] + ], + "responses": { + "$id": "2281" + } } ] }, { - "$id": "2276", + "$id": "2282", "Name": "DeleteMultivariateModel", "ResourceName": "Multivariate", "Summary": "Delete Multivariate Model", @@ -16109,18 +16127,18 @@ "Accessibility": "public", "Parameters": [ { - "$ref": "2160" + "$ref": "2163" }, { - "$ref": "2162" + "$ref": "2165" }, { - "$id": "2277", + "$id": "2283", "Name": "modelId", "NameInRequest": "modelId", "Description": "Model identifier.", "Type": { - "$id": "2278", + "$id": "2284", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -16136,14 +16154,14 @@ "Decorators": [] }, { - "$id": "2279", + "$id": "2285", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "2280", + "$id": "2286", "Kind": "constant", "ValueType": { - "$id": "2281", + "$id": "2287", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -16164,7 +16182,7 @@ ], "Responses": [ { - "$id": "2282", + "$id": "2288", "StatusCodes": [ 204 ], @@ -16184,40 +16202,40 @@ "Decorators": [], "Examples": [ { - "$id": "2283", + "$id": "2289", "kind": "http", "name": "Delete multivariate model", "description": "Delete multivariate model", "filePath": "v1.1/DeleteModel.json", "rawExample": { - "$id": "2284", + "$id": "2290", "operationId": "Multivariate_DeleteMultivariateModel", "title": "Delete multivariate model", "parameters": { - "$id": "2285", + "$id": "2291", "Endpoint": "{Endpoint}", "ApiVersion": "v1.1", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "modelId": "45aad126-aafd-11ea-b8fb-d89ef3400c5f", "body": { - "$id": "2286" + "$id": "2292" } }, "responses": { "204": { - "$id": "2288" + "$id": "2294" }, - "$id": "2287", + "$id": "2293", "default": { - "$id": "2289", + "$id": "2295", "headers": { - "$id": "2290", + "$id": "2296", "Content-Type": "application/json", "x-ms-error-code": "Error Code" }, "body": { - "$id": "2291", + "$id": "2297", "code": "Error Code", "message": "Error Message" } @@ -16226,25 +16244,28 @@ }, "parameters": [ { - "$id": "2292", + "$id": "2298", "parameter": { - "$ref": "2277" + "$ref": "2283" }, "value": { - "$id": "2293", + "$id": "2299", "kind": "string", "type": { - "$ref": "2278" + "$ref": "2284" }, "value": "45aad126-aafd-11ea-b8fb-d89ef3400c5f" } } - ] + ], + "responses": { + "$id": "2300" + } } ] }, { - "$id": "2294", + "$id": "2301", "Name": "GetMultivariateModel", "ResourceName": "Multivariate", "Summary": "Get Multivariate Model", @@ -16252,18 +16273,18 @@ "Accessibility": "public", "Parameters": [ { - "$ref": "2160" + "$ref": "2163" }, { - "$ref": "2162" + "$ref": "2165" }, { - "$id": "2295", + "$id": "2302", "Name": "modelId", "NameInRequest": "modelId", "Description": "Model identifier.", "Type": { - "$id": "2296", + "$id": "2303", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -16279,14 +16300,14 @@ "Decorators": [] }, { - "$id": "2297", + "$id": "2304", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "2298", + "$id": "2305", "Kind": "constant", "ValueType": { - "$id": "2299", + "$id": "2306", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -16307,7 +16328,7 @@ ], "Responses": [ { - "$id": "2300", + "$id": "2307", "StatusCodes": [ 200 ], @@ -16333,39 +16354,39 @@ "Decorators": [], "Examples": [ { - "$id": "2301", + "$id": "2308", "kind": "http", "name": "Get a multivariate model", "description": "Get a multivariate model", "filePath": "v1.1/GetModel.json", "rawExample": { - "$id": "2302", + "$id": "2309", "operationId": "Multivariate_GetMultivariateModel", "title": "Get a multivariate model", "parameters": { - "$id": "2303", + "$id": "2310", "Endpoint": "{Endpoint}", "ApiVersion": "v1.1", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "modelId": "45aad126-aafd-11ea-b8fb-d89ef3400c5f", "body": { - "$id": "2304" + "$id": "2311" } }, "responses": { "200": { - "$id": "2306", + "$id": "2313", "body": { - "$id": "2307", + "$id": "2314", "modelId": "45aad126-aafd-11ea-b8fb-d89ef3400c5f", "createdTime": "2020-06-30T00:00:00Z", "lastUpdatedTime": "2020-06-30T00:00:00Z", "modelInfo": { - "$id": "2308", + "$id": "2315", "slidingWindow": 20, "alignPolicy": { - "$id": "2309", + "$id": "2316", "alignMode": "Outer", "fillNAMethod": "Linear", "paddingValue": 0 @@ -16378,9 +16399,9 @@ "status": "READY", "errors": [], "diagnosticsInfo": { - "$id": "2310", + "$id": "2317", "modelState": { - "$id": "2311", + "$id": "2318", "epochIds": [ 10, 20, @@ -16432,7 +16453,7 @@ }, "variableStates": [ { - "$id": "2312", + "$id": "2319", "variable": "ad_input", "filledNARatio": 0, "effectiveCount": 1441, @@ -16440,7 +16461,7 @@ "lastTimestamp": "2019-04-02T00:00:00Z" }, { - "$id": "2313", + "$id": "2320", "variable": "ad_ontimer_output", "filledNARatio": 0, "effectiveCount": 1441, @@ -16448,7 +16469,7 @@ "lastTimestamp": "2019-04-02T00:00:00Z" }, { - "$id": "2314", + "$id": "2321", "variable": "ingestion", "filledNARatio": 0, "effectiveCount": 1441, @@ -16456,7 +16477,7 @@ "lastTimestamp": "2019-04-02T00:00:00Z" }, { - "$id": "2315", + "$id": "2322", "variable": "data_in_speed", "filledNARatio": 0, "effectiveCount": 1441, @@ -16464,7 +16485,7 @@ "lastTimestamp": "2019-04-02T00:00:00Z" }, { - "$id": "2316", + "$id": "2323", "variable": "cpu", "filledNARatio": 0, "effectiveCount": 1441, @@ -16472,7 +16493,7 @@ "lastTimestamp": "2019-04-02T00:00:00Z" }, { - "$id": "2317", + "$id": "2324", "variable": "ad_series_init", "filledNARatio": 0, "effectiveCount": 1441, @@ -16480,7 +16501,7 @@ "lastTimestamp": "2019-04-02T00:00:00Z" }, { - "$id": "2318", + "$id": "2325", "variable": "flink_last_ckpt_duration", "filledNARatio": 0, "effectiveCount": 1441, @@ -16488,7 +16509,7 @@ "lastTimestamp": "2019-04-02T00:00:00Z" }, { - "$id": "2319", + "$id": "2326", "variable": "data_out_speed", "filledNARatio": 0, "effectiveCount": 1441, @@ -16496,7 +16517,7 @@ "lastTimestamp": "2019-04-02T00:00:00Z" }, { - "$id": "2320", + "$id": "2327", "variable": "ad_output", "filledNARatio": 0, "effectiveCount": 1441, @@ -16508,16 +16529,16 @@ } } }, - "$id": "2305", + "$id": "2312", "default": { - "$id": "2321", + "$id": "2328", "headers": { - "$id": "2322", + "$id": "2329", "Content-Type": "application/json", "x-ms-error-code": "Error Code" }, "body": { - "$id": "2323", + "$id": "2330", "code": "Error Code", "message": "Error Message" } @@ -16526,25 +16547,28 @@ }, "parameters": [ { - "$id": "2324", + "$id": "2331", "parameter": { - "$ref": "2295" + "$ref": "2302" }, "value": { - "$id": "2325", + "$id": "2332", "kind": "string", "type": { - "$ref": "2296" + "$ref": "2303" }, "value": "45aad126-aafd-11ea-b8fb-d89ef3400c5f" } } - ] + ], + "responses": { + "$id": "2333" + } } ] }, { - "$id": "2326", + "$id": "2334", "Name": "DetectMultivariateBatchAnomaly", "ResourceName": "Multivariate", "Summary": "Detect Multivariate Anomaly", @@ -16552,18 +16576,18 @@ "Accessibility": "public", "Parameters": [ { - "$ref": "2160" + "$ref": "2163" }, { - "$ref": "2162" + "$ref": "2165" }, { - "$id": "2327", + "$id": "2335", "Name": "modelId", "NameInRequest": "modelId", "Description": "Model identifier.", "Type": { - "$id": "2328", + "$id": "2336", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -16579,15 +16603,15 @@ "Decorators": [] }, { - "$id": "2329", + "$id": "2337", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "2330", + "$id": "2338", "Kind": "constant", "ValueType": { - "$id": "2331", + "$id": "2339", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -16606,14 +16630,14 @@ "Decorators": [] }, { - "$id": "2332", + "$id": "2340", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "2333", + "$id": "2341", "Kind": "constant", "ValueType": { - "$id": "2334", + "$id": "2342", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -16632,7 +16656,7 @@ "Decorators": [] }, { - "$id": "2335", + "$id": "2343", "Name": "options", "NameInRequest": "options", "Description": "Request of multivariate anomaly detection.", @@ -16651,7 +16675,7 @@ ], "Responses": [ { - "$id": "2336", + "$id": "2344", "StatusCodes": [ 202 ], @@ -16661,12 +16685,12 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "2337", + "$id": "2345", "Name": "Operation-Id", "NameInResponse": "operation-id", "Description": "Id of the detection result.", "Type": { - "$id": "2338", + "$id": "2346", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -16674,12 +16698,12 @@ } }, { - "$id": "2339", + "$id": "2347", "Name": "Operation-Location", "NameInResponse": "operation-location", "Description": "Location of the detection result.", "Type": { - "$id": "2340", + "$id": "2348", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -16707,24 +16731,24 @@ "Decorators": [], "Examples": [ { - "$id": "2341", + "$id": "2349", "kind": "http", "name": "Detect multivariate batch anomaly", "description": "Detect multivariate batch anomaly", "filePath": "v1.1/DetectAnomaly.json", "rawExample": { - "$id": "2342", + "$id": "2350", "operationId": "Multivariate_DetectMultivariateBatchAnomaly", "title": "Detect multivariate batch anomaly", "parameters": { - "$id": "2343", + "$id": "2351", "Endpoint": "{Endpoint}", "ApiVersion": "v1.1", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "modelId": "45aad126-aafd-11ea-b8fb-d89ef3400c5f", "options": { - "$id": "2344", + "$id": "2352", "dataSource": "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", "topContributorCount": 10, "startTime": "2019-04-01T00:15:00Z", @@ -16733,21 +16757,21 @@ }, "responses": { "202": { - "$id": "2346", + "$id": "2354", "headers": { - "$id": "2347", + "$id": "2355", "Operation-Location": "{Endpoint}/anomalydetector/v1.1/multivariate/detect-batch/", "Operation-Id": "663884e6-b117-11ea-b3de-0242ac130004" }, "body": { - "$id": "2348", + "$id": "2356", "resultId": "663884e6-b117-11ea-b3de-0242ac130004", "summary": { - "$id": "2349", + "$id": "2357", "status": "CREATED", "errors": [], "setupInfo": { - "$id": "2350", + "$id": "2358", "dataSource": "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv", "topContributorCount": 10, "startTime": "2021-01-01T00:00:00Z", @@ -16757,16 +16781,16 @@ "results": [] } }, - "$id": "2345", + "$id": "2353", "default": { - "$id": "2351", + "$id": "2359", "headers": { - "$id": "2352", + "$id": "2360", "Content-Type": "application/json", "x-ms-error-code": "Error Code" }, "body": { - "$id": "2353", + "$id": "2361", "code": "Error Code", "message": "Error Message" } @@ -16775,34 +16799,34 @@ }, "parameters": [ { - "$id": "2354", + "$id": "2362", "parameter": { - "$ref": "2327" + "$ref": "2335" }, "value": { - "$id": "2355", + "$id": "2363", "kind": "string", "type": { - "$ref": "2328" + "$ref": "2336" }, "value": "45aad126-aafd-11ea-b8fb-d89ef3400c5f" } }, { - "$id": "2356", + "$id": "2364", "parameter": { - "$ref": "2335" + "$ref": "2343" }, "value": { - "$id": "2357", + "$id": "2365", "kind": "model", "type": { "$ref": "97" }, "value": { - "$id": "2358", + "$id": "2366", "dataSource": { - "$id": "2359", + "$id": "2367", "kind": "string", "type": { "$ref": "99" @@ -16810,7 +16834,7 @@ "value": "https://multiadsample.blob.core.windows.net/data/sample_data_2_1000.csv" }, "topContributorCount": { - "$id": "2360", + "$id": "2368", "kind": "number", "type": { "$ref": "101" @@ -16818,7 +16842,7 @@ "value": 10 }, "startTime": { - "$id": "2361", + "$id": "2369", "kind": "string", "type": { "$ref": "103" @@ -16826,7 +16850,7 @@ "value": "2019-04-01T00:15:00Z" }, "endTime": { - "$id": "2362", + "$id": "2370", "kind": "string", "type": { "$ref": "106" @@ -16836,12 +16860,15 @@ } } } - ] + ], + "responses": { + "$id": "2371" + } } ] }, { - "$id": "2363", + "$id": "2372", "Name": "DetectMultivariateLastAnomaly", "ResourceName": "Multivariate", "Summary": "Detect anomalies in the last point of the request body", @@ -16849,18 +16876,18 @@ "Accessibility": "public", "Parameters": [ { - "$ref": "2160" + "$ref": "2163" }, { - "$ref": "2162" + "$ref": "2165" }, { - "$id": "2364", + "$id": "2373", "Name": "modelId", "NameInRequest": "modelId", "Description": "Model identifier.", "Type": { - "$id": "2365", + "$id": "2374", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -16876,15 +16903,15 @@ "Decorators": [] }, { - "$id": "2366", + "$id": "2375", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "2367", + "$id": "2376", "Kind": "constant", "ValueType": { - "$id": "2368", + "$id": "2377", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -16903,14 +16930,14 @@ "Decorators": [] }, { - "$id": "2369", + "$id": "2378", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "2370", + "$id": "2379", "Kind": "constant", "ValueType": { - "$id": "2371", + "$id": "2380", "Kind": "string", "Name": "string", "CrossLanguageDefinitionId": "TypeSpec.string", @@ -16929,7 +16956,7 @@ "Decorators": [] }, { - "$id": "2372", + "$id": "2381", "Name": "options", "NameInRequest": "options", "Description": "Request of last detection.", @@ -16948,7 +16975,7 @@ ], "Responses": [ { - "$id": "2373", + "$id": "2382", "StatusCodes": [ 200 ], @@ -16977,27 +17004,27 @@ "Decorators": [], "Examples": [ { - "$id": "2374", + "$id": "2383", "kind": "http", "name": "Detect multivariate last anomaly", "description": "Detect multivariate last anomaly", "filePath": "v1.1/LastDetectAnomaly.json", "rawExample": { - "$id": "2375", + "$id": "2384", "operationId": "Multivariate_DetectMultivariateLastAnomaly", "title": "Detect multivariate last anomaly", "parameters": { - "$id": "2376", + "$id": "2385", "Endpoint": "{Endpoint}", "ApiVersion": "v1.1", "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": "{API key}", "modelId": "45aad126-aafd-11ea-b8fb-d89ef3400c5f", "options": { - "$id": "2377", + "$id": "2386", "variables": [ { - "$id": "2378", + "$id": "2387", "variable": "Variable_1", "timestamps": [ "2021-01-01T00:00:00Z", @@ -17065,7 +17092,7 @@ ] }, { - "$id": "2379", + "$id": "2388", "variable": "Variable_2", "timestamps": [ "2021-01-01T00:00:00Z", @@ -17133,7 +17160,7 @@ ] }, { - "$id": "2380", + "$id": "2389", "variable": "Variable_3", "timestamps": [ "2021-01-01T00:00:00Z", @@ -17206,12 +17233,12 @@ }, "responses": { "200": { - "$id": "2382", + "$id": "2391", "body": { - "$id": "2383", + "$id": "2392", "variableStates": [ { - "$id": "2384", + "$id": "2393", "variable": "variable_1", "filledNARatio": 0, "effectiveCount": 30, @@ -17219,7 +17246,7 @@ "lastTimestamp": "2021-01-01T00:29:00Z" }, { - "$id": "2385", + "$id": "2394", "variable": "variable_2", "filledNARatio": 0, "effectiveCount": 30, @@ -17227,7 +17254,7 @@ "lastTimestamp": "2021-01-01T00:29:00Z" }, { - "$id": "2386", + "$id": "2395", "variable": "variable_3", "filledNARatio": 0, "effectiveCount": 30, @@ -17237,10 +17264,10 @@ ], "results": [ { - "$id": "2387", + "$id": "2396", "timestamp": "2021-01-01T00:28:00Z", "value": { - "$id": "2388", + "$id": "2397", "isAnomaly": false, "severity": 0, "score": 0.6928471326828003 @@ -17248,20 +17275,20 @@ "errors": [] }, { - "$id": "2389", + "$id": "2398", "timestamp": "2021-01-01T00:29:00Z", "value": { - "$id": "2390", + "$id": "2399", "isAnomaly": true, "severity": 0.5337404608726501, "score": 0.9171165823936462, "interpretation": [ { - "$id": "2391", + "$id": "2400", "variable": "variable_2", "contributionScore": 0.5371576215, "correlationChanges": { - "$id": "2392", + "$id": "2401", "changedVariables": [ "variable_1", "variable_3" @@ -17269,22 +17296,22 @@ } }, { - "$id": "2393", + "$id": "2402", "variable": "variable_3", "contributionScore": 0.3324159383, "correlationChanges": { - "$id": "2394", + "$id": "2403", "changedVariables": [ "variable_2" ] } }, { - "$id": "2395", + "$id": "2404", "variable": "variable_1", "contributionScore": 0.1304264402, "correlationChanges": { - "$id": "2396", + "$id": "2405", "changedVariables": [] } } @@ -17295,16 +17322,16 @@ ] } }, - "$id": "2381", + "$id": "2390", "default": { - "$id": "2397", + "$id": "2406", "headers": { - "$id": "2398", + "$id": "2407", "Content-Type": "application/json", "x-ms-error-code": "Error Code" }, "body": { - "$id": "2399", + "$id": "2408", "code": "Error Code", "message": "Error Message" } @@ -17313,49 +17340,49 @@ }, "parameters": [ { - "$id": "2400", + "$id": "2409", "parameter": { - "$ref": "2364" + "$ref": "2373" }, "value": { - "$id": "2401", + "$id": "2410", "kind": "string", "type": { - "$ref": "2365" + "$ref": "2374" }, "value": "45aad126-aafd-11ea-b8fb-d89ef3400c5f" } }, { - "$id": "2402", + "$id": "2411", "parameter": { - "$ref": "2372" + "$ref": "2381" }, "value": { - "$id": "2403", + "$id": "2412", "kind": "model", "type": { "$ref": "197" }, "value": { - "$id": "2404", + "$id": "2413", "variables": { - "$id": "2405", + "$id": "2414", "kind": "array", "type": { "$ref": "199" }, "value": [ { - "$id": "2406", + "$id": "2415", "kind": "model", "type": { "$ref": "200" }, "value": { - "$id": "2407", + "$id": "2416", "variable": { - "$id": "2408", + "$id": "2417", "kind": "string", "type": { "$ref": "202" @@ -17363,14 +17390,14 @@ "value": "Variable_1" }, "timestamps": { - "$id": "2409", + "$id": "2418", "kind": "array", "type": { "$ref": "204" }, "value": [ { - "$id": "2410", + "$id": "2419", "kind": "string", "type": { "$ref": "205" @@ -17378,7 +17405,7 @@ "value": "2021-01-01T00:00:00Z" }, { - "$id": "2411", + "$id": "2420", "kind": "string", "type": { "$ref": "205" @@ -17386,7 +17413,7 @@ "value": "2021-01-01T00:01:00Z" }, { - "$id": "2412", + "$id": "2421", "kind": "string", "type": { "$ref": "205" @@ -17394,7 +17421,7 @@ "value": "2021-01-01T00:02:00Z" }, { - "$id": "2413", + "$id": "2422", "kind": "string", "type": { "$ref": "205" @@ -17402,7 +17429,7 @@ "value": "2021-01-01T00:03:00Z" }, { - "$id": "2414", + "$id": "2423", "kind": "string", "type": { "$ref": "205" @@ -17410,7 +17437,7 @@ "value": "2021-01-01T00:04:00Z" }, { - "$id": "2415", + "$id": "2424", "kind": "string", "type": { "$ref": "205" @@ -17418,7 +17445,7 @@ "value": "2021-01-01T00:05:00Z" }, { - "$id": "2416", + "$id": "2425", "kind": "string", "type": { "$ref": "205" @@ -17426,7 +17453,7 @@ "value": "2021-01-01T00:06:00Z" }, { - "$id": "2417", + "$id": "2426", "kind": "string", "type": { "$ref": "205" @@ -17434,7 +17461,7 @@ "value": "2021-01-01T00:07:00Z" }, { - "$id": "2418", + "$id": "2427", "kind": "string", "type": { "$ref": "205" @@ -17442,7 +17469,7 @@ "value": "2021-01-01T00:08:00Z" }, { - "$id": "2419", + "$id": "2428", "kind": "string", "type": { "$ref": "205" @@ -17450,7 +17477,7 @@ "value": "2021-01-01T00:09:00Z" }, { - "$id": "2420", + "$id": "2429", "kind": "string", "type": { "$ref": "205" @@ -17458,7 +17485,7 @@ "value": "2021-01-01T00:10:00Z" }, { - "$id": "2421", + "$id": "2430", "kind": "string", "type": { "$ref": "205" @@ -17466,7 +17493,7 @@ "value": "2021-01-01T00:11:00Z" }, { - "$id": "2422", + "$id": "2431", "kind": "string", "type": { "$ref": "205" @@ -17474,7 +17501,7 @@ "value": "2021-01-01T00:12:00Z" }, { - "$id": "2423", + "$id": "2432", "kind": "string", "type": { "$ref": "205" @@ -17482,7 +17509,7 @@ "value": "2021-01-01T00:13:00Z" }, { - "$id": "2424", + "$id": "2433", "kind": "string", "type": { "$ref": "205" @@ -17490,7 +17517,7 @@ "value": "2021-01-01T00:14:00Z" }, { - "$id": "2425", + "$id": "2434", "kind": "string", "type": { "$ref": "205" @@ -17498,7 +17525,7 @@ "value": "2021-01-01T00:15:00Z" }, { - "$id": "2426", + "$id": "2435", "kind": "string", "type": { "$ref": "205" @@ -17506,7 +17533,7 @@ "value": "2021-01-01T00:16:00Z" }, { - "$id": "2427", + "$id": "2436", "kind": "string", "type": { "$ref": "205" @@ -17514,7 +17541,7 @@ "value": "2021-01-01T00:17:00Z" }, { - "$id": "2428", + "$id": "2437", "kind": "string", "type": { "$ref": "205" @@ -17522,7 +17549,7 @@ "value": "2021-01-01T00:18:00Z" }, { - "$id": "2429", + "$id": "2438", "kind": "string", "type": { "$ref": "205" @@ -17530,7 +17557,7 @@ "value": "2021-01-01T00:19:00Z" }, { - "$id": "2430", + "$id": "2439", "kind": "string", "type": { "$ref": "205" @@ -17538,7 +17565,7 @@ "value": "2021-01-01T00:20:00Z" }, { - "$id": "2431", + "$id": "2440", "kind": "string", "type": { "$ref": "205" @@ -17546,7 +17573,7 @@ "value": "2021-01-01T00:21:00Z" }, { - "$id": "2432", + "$id": "2441", "kind": "string", "type": { "$ref": "205" @@ -17554,7 +17581,7 @@ "value": "2021-01-01T00:22:00Z" }, { - "$id": "2433", + "$id": "2442", "kind": "string", "type": { "$ref": "205" @@ -17562,7 +17589,7 @@ "value": "2021-01-01T00:23:00Z" }, { - "$id": "2434", + "$id": "2443", "kind": "string", "type": { "$ref": "205" @@ -17570,7 +17597,7 @@ "value": "2021-01-01T00:24:00Z" }, { - "$id": "2435", + "$id": "2444", "kind": "string", "type": { "$ref": "205" @@ -17578,7 +17605,7 @@ "value": "2021-01-01T00:25:00Z" }, { - "$id": "2436", + "$id": "2445", "kind": "string", "type": { "$ref": "205" @@ -17586,7 +17613,7 @@ "value": "2021-01-01T00:26:00Z" }, { - "$id": "2437", + "$id": "2446", "kind": "string", "type": { "$ref": "205" @@ -17594,7 +17621,7 @@ "value": "2021-01-01T00:27:00Z" }, { - "$id": "2438", + "$id": "2447", "kind": "string", "type": { "$ref": "205" @@ -17602,7 +17629,7 @@ "value": "2021-01-01T00:28:00Z" }, { - "$id": "2439", + "$id": "2448", "kind": "string", "type": { "$ref": "205" @@ -17612,14 +17639,14 @@ ] }, "values": { - "$id": "2440", + "$id": "2449", "kind": "array", "type": { "$ref": "207" }, "value": [ { - "$id": "2441", + "$id": "2450", "kind": "number", "type": { "$ref": "208" @@ -17627,7 +17654,7 @@ "value": 0.4551378545933972 }, { - "$id": "2442", + "$id": "2451", "kind": "number", "type": { "$ref": "208" @@ -17635,7 +17662,7 @@ "value": 0.7388603950488748 }, { - "$id": "2443", + "$id": "2452", "kind": "number", "type": { "$ref": "208" @@ -17643,7 +17670,7 @@ "value": 0.201088255984052 }, { - "$id": "2444", + "$id": "2453", "kind": "number", "type": { "$ref": "208" @@ -17651,7 +17678,7 @@ "value": 0.7462812245891899 }, { - "$id": "2445", + "$id": "2454", "kind": "number", "type": { "$ref": "208" @@ -17659,7 +17686,7 @@ "value": 0.07308128850401663 }, { - "$id": "2446", + "$id": "2455", "kind": "number", "type": { "$ref": "208" @@ -17667,7 +17694,7 @@ "value": 0.33090474587393537 }, { - "$id": "2447", + "$id": "2456", "kind": "number", "type": { "$ref": "208" @@ -17675,7 +17702,7 @@ "value": 0.7544925268153315 }, { - "$id": "2448", + "$id": "2457", "kind": "number", "type": { "$ref": "208" @@ -17683,7 +17710,7 @@ "value": 0.987506336316328 }, { - "$id": "2449", + "$id": "2458", "kind": "number", "type": { "$ref": "208" @@ -17691,7 +17718,7 @@ "value": 0.6665932993421468 }, { - "$id": "2450", + "$id": "2459", "kind": "number", "type": { "$ref": "208" @@ -17699,7 +17726,7 @@ "value": 0.6308351543168672 }, { - "$id": "2451", + "$id": "2460", "kind": "number", "type": { "$ref": "208" @@ -17707,7 +17734,7 @@ "value": 0.08083310161466228 }, { - "$id": "2452", + "$id": "2461", "kind": "number", "type": { "$ref": "208" @@ -17715,7 +17742,7 @@ "value": 0.8414415588668442 }, { - "$id": "2453", + "$id": "2462", "kind": "number", "type": { "$ref": "208" @@ -17723,7 +17750,7 @@ "value": 0.514583545640453 }, { - "$id": "2454", + "$id": "2463", "kind": "number", "type": { "$ref": "208" @@ -17731,7 +17758,7 @@ "value": 0.0954489875193526 }, { - "$id": "2455", + "$id": "2464", "kind": "number", "type": { "$ref": "208" @@ -17739,7 +17766,7 @@ "value": 0.7786793231920507 }, { - "$id": "2456", + "$id": "2465", "kind": "number", "type": { "$ref": "208" @@ -17747,7 +17774,7 @@ "value": 0.41646133667960994 }, { - "$id": "2457", + "$id": "2466", "kind": "number", "type": { "$ref": "208" @@ -17755,7 +17782,7 @@ "value": 0.030176187583339287 }, { - "$id": "2458", + "$id": "2467", "kind": "number", "type": { "$ref": "208" @@ -17763,7 +17790,7 @@ "value": 0.3474214937189324 }, { - "$id": "2459", + "$id": "2468", "kind": "number", "type": { "$ref": "208" @@ -17771,7 +17798,7 @@ "value": 0.508530173413991 }, { - "$id": "2460", + "$id": "2469", "kind": "number", "type": { "$ref": "208" @@ -17779,7 +17806,7 @@ "value": 0.42451199127255046 }, { - "$id": "2461", + "$id": "2470", "kind": "number", "type": { "$ref": "208" @@ -17787,7 +17814,7 @@ "value": 0.2115944222725208 }, { - "$id": "2462", + "$id": "2471", "kind": "number", "type": { "$ref": "208" @@ -17795,7 +17822,7 @@ "value": 0.24733519545833516 }, { - "$id": "2463", + "$id": "2472", "kind": "number", "type": { "$ref": "208" @@ -17803,7 +17830,7 @@ "value": 0.8791022110982156 }, { - "$id": "2464", + "$id": "2473", "kind": "number", "type": { "$ref": "208" @@ -17811,7 +17838,7 @@ "value": 0.9479621899884665 }, { - "$id": "2465", + "$id": "2474", "kind": "number", "type": { "$ref": "208" @@ -17819,7 +17846,7 @@ "value": 0.26702703121252136 }, { - "$id": "2466", + "$id": "2475", "kind": "number", "type": { "$ref": "208" @@ -17827,7 +17854,7 @@ "value": 0.6954503497669413 }, { - "$id": "2467", + "$id": "2476", "kind": "number", "type": { "$ref": "208" @@ -17835,7 +17862,7 @@ "value": 0.1235728391488995 }, { - "$id": "2468", + "$id": "2477", "kind": "number", "type": { "$ref": "208" @@ -17843,7 +17870,7 @@ "value": 0.8214915473050647 }, { - "$id": "2469", + "$id": "2478", "kind": "number", "type": { "$ref": "208" @@ -17851,7 +17878,7 @@ "value": 0.11813002444192677 }, { - "$id": "2470", + "$id": "2479", "kind": "number", "type": { "$ref": "208" @@ -17863,15 +17890,15 @@ } }, { - "$id": "2471", + "$id": "2480", "kind": "model", "type": { "$ref": "200" }, "value": { - "$id": "2472", + "$id": "2481", "variable": { - "$id": "2473", + "$id": "2482", "kind": "string", "type": { "$ref": "202" @@ -17879,14 +17906,14 @@ "value": "Variable_2" }, "timestamps": { - "$id": "2474", + "$id": "2483", "kind": "array", "type": { "$ref": "204" }, "value": [ { - "$id": "2475", + "$id": "2484", "kind": "string", "type": { "$ref": "205" @@ -17894,7 +17921,7 @@ "value": "2021-01-01T00:00:00Z" }, { - "$id": "2476", + "$id": "2485", "kind": "string", "type": { "$ref": "205" @@ -17902,7 +17929,7 @@ "value": "2021-01-01T00:01:00Z" }, { - "$id": "2477", + "$id": "2486", "kind": "string", "type": { "$ref": "205" @@ -17910,7 +17937,7 @@ "value": "2021-01-01T00:02:00Z" }, { - "$id": "2478", + "$id": "2487", "kind": "string", "type": { "$ref": "205" @@ -17918,7 +17945,7 @@ "value": "2021-01-01T00:03:00Z" }, { - "$id": "2479", + "$id": "2488", "kind": "string", "type": { "$ref": "205" @@ -17926,7 +17953,7 @@ "value": "2021-01-01T00:04:00Z" }, { - "$id": "2480", + "$id": "2489", "kind": "string", "type": { "$ref": "205" @@ -17934,7 +17961,7 @@ "value": "2021-01-01T00:05:00Z" }, { - "$id": "2481", + "$id": "2490", "kind": "string", "type": { "$ref": "205" @@ -17942,7 +17969,7 @@ "value": "2021-01-01T00:06:00Z" }, { - "$id": "2482", + "$id": "2491", "kind": "string", "type": { "$ref": "205" @@ -17950,7 +17977,7 @@ "value": "2021-01-01T00:07:00Z" }, { - "$id": "2483", + "$id": "2492", "kind": "string", "type": { "$ref": "205" @@ -17958,7 +17985,7 @@ "value": "2021-01-01T00:08:00Z" }, { - "$id": "2484", + "$id": "2493", "kind": "string", "type": { "$ref": "205" @@ -17966,7 +17993,7 @@ "value": "2021-01-01T00:09:00Z" }, { - "$id": "2485", + "$id": "2494", "kind": "string", "type": { "$ref": "205" @@ -17974,7 +18001,7 @@ "value": "2021-01-01T00:10:00Z" }, { - "$id": "2486", + "$id": "2495", "kind": "string", "type": { "$ref": "205" @@ -17982,7 +18009,7 @@ "value": "2021-01-01T00:11:00Z" }, { - "$id": "2487", + "$id": "2496", "kind": "string", "type": { "$ref": "205" @@ -17990,7 +18017,7 @@ "value": "2021-01-01T00:12:00Z" }, { - "$id": "2488", + "$id": "2497", "kind": "string", "type": { "$ref": "205" @@ -17998,7 +18025,7 @@ "value": "2021-01-01T00:13:00Z" }, { - "$id": "2489", + "$id": "2498", "kind": "string", "type": { "$ref": "205" @@ -18006,7 +18033,7 @@ "value": "2021-01-01T00:14:00Z" }, { - "$id": "2490", + "$id": "2499", "kind": "string", "type": { "$ref": "205" @@ -18014,7 +18041,7 @@ "value": "2021-01-01T00:15:00Z" }, { - "$id": "2491", + "$id": "2500", "kind": "string", "type": { "$ref": "205" @@ -18022,7 +18049,7 @@ "value": "2021-01-01T00:16:00Z" }, { - "$id": "2492", + "$id": "2501", "kind": "string", "type": { "$ref": "205" @@ -18030,7 +18057,7 @@ "value": "2021-01-01T00:17:00Z" }, { - "$id": "2493", + "$id": "2502", "kind": "string", "type": { "$ref": "205" @@ -18038,7 +18065,7 @@ "value": "2021-01-01T00:18:00Z" }, { - "$id": "2494", + "$id": "2503", "kind": "string", "type": { "$ref": "205" @@ -18046,7 +18073,7 @@ "value": "2021-01-01T00:19:00Z" }, { - "$id": "2495", + "$id": "2504", "kind": "string", "type": { "$ref": "205" @@ -18054,7 +18081,7 @@ "value": "2021-01-01T00:20:00Z" }, { - "$id": "2496", + "$id": "2505", "kind": "string", "type": { "$ref": "205" @@ -18062,7 +18089,7 @@ "value": "2021-01-01T00:21:00Z" }, { - "$id": "2497", + "$id": "2506", "kind": "string", "type": { "$ref": "205" @@ -18070,7 +18097,7 @@ "value": "2021-01-01T00:22:00Z" }, { - "$id": "2498", + "$id": "2507", "kind": "string", "type": { "$ref": "205" @@ -18078,7 +18105,7 @@ "value": "2021-01-01T00:23:00Z" }, { - "$id": "2499", + "$id": "2508", "kind": "string", "type": { "$ref": "205" @@ -18086,7 +18113,7 @@ "value": "2021-01-01T00:24:00Z" }, { - "$id": "2500", + "$id": "2509", "kind": "string", "type": { "$ref": "205" @@ -18094,7 +18121,7 @@ "value": "2021-01-01T00:25:00Z" }, { - "$id": "2501", + "$id": "2510", "kind": "string", "type": { "$ref": "205" @@ -18102,7 +18129,7 @@ "value": "2021-01-01T00:26:00Z" }, { - "$id": "2502", + "$id": "2511", "kind": "string", "type": { "$ref": "205" @@ -18110,7 +18137,7 @@ "value": "2021-01-01T00:27:00Z" }, { - "$id": "2503", + "$id": "2512", "kind": "string", "type": { "$ref": "205" @@ -18118,7 +18145,7 @@ "value": "2021-01-01T00:28:00Z" }, { - "$id": "2504", + "$id": "2513", "kind": "string", "type": { "$ref": "205" @@ -18128,14 +18155,14 @@ ] }, "values": { - "$id": "2505", + "$id": "2514", "kind": "array", "type": { "$ref": "207" }, "value": [ { - "$id": "2506", + "$id": "2515", "kind": "number", "type": { "$ref": "208" @@ -18143,7 +18170,7 @@ "value": 0.9617871613964145 }, { - "$id": "2507", + "$id": "2516", "kind": "number", "type": { "$ref": "208" @@ -18151,7 +18178,7 @@ "value": 0.24903311574778408 }, { - "$id": "2508", + "$id": "2517", "kind": "number", "type": { "$ref": "208" @@ -18159,7 +18186,7 @@ "value": 0.4920561254118613 }, { - "$id": "2509", + "$id": "2518", "kind": "number", "type": { "$ref": "208" @@ -18167,7 +18194,7 @@ "value": 0.9895601049618598 }, { - "$id": "2510", + "$id": "2519", "kind": "number", "type": { "$ref": "208" @@ -18175,7 +18202,7 @@ "value": 0.9171759283128094 }, { - "$id": "2511", + "$id": "2520", "kind": "number", "type": { "$ref": "208" @@ -18183,7 +18210,7 @@ "value": 0.5754204711105273 }, { - "$id": "2512", + "$id": "2521", "kind": "number", "type": { "$ref": "208" @@ -18191,7 +18218,7 @@ "value": 0.1811033296265634 }, { - "$id": "2513", + "$id": "2522", "kind": "number", "type": { "$ref": "208" @@ -18199,7 +18226,7 @@ "value": 0.8852311981742577 }, { - "$id": "2514", + "$id": "2523", "kind": "number", "type": { "$ref": "208" @@ -18207,7 +18234,7 @@ "value": 0.9543231904644779 }, { - "$id": "2515", + "$id": "2524", "kind": "number", "type": { "$ref": "208" @@ -18215,7 +18242,7 @@ "value": 0.7088012446094262 }, { - "$id": "2516", + "$id": "2525", "kind": "number", "type": { "$ref": "208" @@ -18223,7 +18250,7 @@ "value": 0.7843572237149014 }, { - "$id": "2517", + "$id": "2526", "kind": "number", "type": { "$ref": "208" @@ -18231,7 +18258,7 @@ "value": 0.7664787010700046 }, { - "$id": "2518", + "$id": "2527", "kind": "number", "type": { "$ref": "208" @@ -18239,7 +18266,7 @@ "value": 0.3699552325387093 }, { - "$id": "2519", + "$id": "2528", "kind": "number", "type": { "$ref": "208" @@ -18247,7 +18274,7 @@ "value": 0.504519908266789 }, { - "$id": "2520", + "$id": "2529", "kind": "number", "type": { "$ref": "208" @@ -18255,7 +18282,7 @@ "value": 0.5848930929950164 }, { - "$id": "2521", + "$id": "2530", "kind": "number", "type": { "$ref": "208" @@ -18263,7 +18290,7 @@ "value": 0.7628913396089576 }, { - "$id": "2522", + "$id": "2531", "kind": "number", "type": { "$ref": "208" @@ -18271,7 +18298,7 @@ "value": 0.8148405868900065 }, { - "$id": "2523", + "$id": "2532", "kind": "number", "type": { "$ref": "208" @@ -18279,7 +18306,7 @@ "value": 0.08540458873739332 }, { - "$id": "2524", + "$id": "2533", "kind": "number", "type": { "$ref": "208" @@ -18287,7 +18314,7 @@ "value": 0.03481976727525682 }, { - "$id": "2525", + "$id": "2534", "kind": "number", "type": { "$ref": "208" @@ -18295,7 +18322,7 @@ "value": 0.21275099339467762 }, { - "$id": "2526", + "$id": "2535", "kind": "number", "type": { "$ref": "208" @@ -18303,7 +18330,7 @@ "value": 0.9836175579199806 }, { - "$id": "2527", + "$id": "2536", "kind": "number", "type": { "$ref": "208" @@ -18311,7 +18338,7 @@ "value": 0.9321441483364282 }, { - "$id": "2528", + "$id": "2537", "kind": "number", "type": { "$ref": "208" @@ -18319,7 +18346,7 @@ "value": 0.038466608085469534 }, { - "$id": "2529", + "$id": "2538", "kind": "number", "type": { "$ref": "208" @@ -18327,7 +18354,7 @@ "value": 0.1723138437622782 }, { - "$id": "2530", + "$id": "2539", "kind": "number", "type": { "$ref": "208" @@ -18335,7 +18362,7 @@ "value": 0.8626383410218382 }, { - "$id": "2531", + "$id": "2540", "kind": "number", "type": { "$ref": "208" @@ -18343,7 +18370,7 @@ "value": 0.35053229974224254 }, { - "$id": "2532", + "$id": "2541", "kind": "number", "type": { "$ref": "208" @@ -18351,7 +18378,7 @@ "value": 0.631141662835182 }, { - "$id": "2533", + "$id": "2542", "kind": "number", "type": { "$ref": "208" @@ -18359,7 +18386,7 @@ "value": 0.0730352607990088 }, { - "$id": "2534", + "$id": "2543", "kind": "number", "type": { "$ref": "208" @@ -18367,7 +18394,7 @@ "value": 0.08886179043386 }, { - "$id": "2535", + "$id": "2544", "kind": "number", "type": { "$ref": "208" @@ -18379,15 +18406,15 @@ } }, { - "$id": "2536", + "$id": "2545", "kind": "model", "type": { "$ref": "200" }, "value": { - "$id": "2537", + "$id": "2546", "variable": { - "$id": "2538", + "$id": "2547", "kind": "string", "type": { "$ref": "202" @@ -18395,14 +18422,14 @@ "value": "Variable_3" }, "timestamps": { - "$id": "2539", + "$id": "2548", "kind": "array", "type": { "$ref": "204" }, "value": [ { - "$id": "2540", + "$id": "2549", "kind": "string", "type": { "$ref": "205" @@ -18410,7 +18437,7 @@ "value": "2021-01-01T00:00:00Z" }, { - "$id": "2541", + "$id": "2550", "kind": "string", "type": { "$ref": "205" @@ -18418,7 +18445,7 @@ "value": "2021-01-01T00:01:00Z" }, { - "$id": "2542", + "$id": "2551", "kind": "string", "type": { "$ref": "205" @@ -18426,7 +18453,7 @@ "value": "2021-01-01T00:02:00Z" }, { - "$id": "2543", + "$id": "2552", "kind": "string", "type": { "$ref": "205" @@ -18434,7 +18461,7 @@ "value": "2021-01-01T00:03:00Z" }, { - "$id": "2544", + "$id": "2553", "kind": "string", "type": { "$ref": "205" @@ -18442,7 +18469,7 @@ "value": "2021-01-01T00:04:00Z" }, { - "$id": "2545", + "$id": "2554", "kind": "string", "type": { "$ref": "205" @@ -18450,7 +18477,7 @@ "value": "2021-01-01T00:05:00Z" }, { - "$id": "2546", + "$id": "2555", "kind": "string", "type": { "$ref": "205" @@ -18458,7 +18485,7 @@ "value": "2021-01-01T00:06:00Z" }, { - "$id": "2547", + "$id": "2556", "kind": "string", "type": { "$ref": "205" @@ -18466,7 +18493,7 @@ "value": "2021-01-01T00:07:00Z" }, { - "$id": "2548", + "$id": "2557", "kind": "string", "type": { "$ref": "205" @@ -18474,7 +18501,7 @@ "value": "2021-01-01T00:08:00Z" }, { - "$id": "2549", + "$id": "2558", "kind": "string", "type": { "$ref": "205" @@ -18482,7 +18509,7 @@ "value": "2021-01-01T00:09:00Z" }, { - "$id": "2550", + "$id": "2559", "kind": "string", "type": { "$ref": "205" @@ -18490,7 +18517,7 @@ "value": "2021-01-01T00:10:00Z" }, { - "$id": "2551", + "$id": "2560", "kind": "string", "type": { "$ref": "205" @@ -18498,7 +18525,7 @@ "value": "2021-01-01T00:11:00Z" }, { - "$id": "2552", + "$id": "2561", "kind": "string", "type": { "$ref": "205" @@ -18506,7 +18533,7 @@ "value": "2021-01-01T00:12:00Z" }, { - "$id": "2553", + "$id": "2562", "kind": "string", "type": { "$ref": "205" @@ -18514,7 +18541,7 @@ "value": "2021-01-01T00:13:00Z" }, { - "$id": "2554", + "$id": "2563", "kind": "string", "type": { "$ref": "205" @@ -18522,7 +18549,7 @@ "value": "2021-01-01T00:14:00Z" }, { - "$id": "2555", + "$id": "2564", "kind": "string", "type": { "$ref": "205" @@ -18530,7 +18557,7 @@ "value": "2021-01-01T00:15:00Z" }, { - "$id": "2556", + "$id": "2565", "kind": "string", "type": { "$ref": "205" @@ -18538,7 +18565,7 @@ "value": "2021-01-01T00:16:00Z" }, { - "$id": "2557", + "$id": "2566", "kind": "string", "type": { "$ref": "205" @@ -18546,7 +18573,7 @@ "value": "2021-01-01T00:17:00Z" }, { - "$id": "2558", + "$id": "2567", "kind": "string", "type": { "$ref": "205" @@ -18554,7 +18581,7 @@ "value": "2021-01-01T00:18:00Z" }, { - "$id": "2559", + "$id": "2568", "kind": "string", "type": { "$ref": "205" @@ -18562,7 +18589,7 @@ "value": "2021-01-01T00:19:00Z" }, { - "$id": "2560", + "$id": "2569", "kind": "string", "type": { "$ref": "205" @@ -18570,7 +18597,7 @@ "value": "2021-01-01T00:20:00Z" }, { - "$id": "2561", + "$id": "2570", "kind": "string", "type": { "$ref": "205" @@ -18578,7 +18605,7 @@ "value": "2021-01-01T00:21:00Z" }, { - "$id": "2562", + "$id": "2571", "kind": "string", "type": { "$ref": "205" @@ -18586,7 +18613,7 @@ "value": "2021-01-01T00:22:00Z" }, { - "$id": "2563", + "$id": "2572", "kind": "string", "type": { "$ref": "205" @@ -18594,7 +18621,7 @@ "value": "2021-01-01T00:23:00Z" }, { - "$id": "2564", + "$id": "2573", "kind": "string", "type": { "$ref": "205" @@ -18602,7 +18629,7 @@ "value": "2021-01-01T00:24:00Z" }, { - "$id": "2565", + "$id": "2574", "kind": "string", "type": { "$ref": "205" @@ -18610,7 +18637,7 @@ "value": "2021-01-01T00:25:00Z" }, { - "$id": "2566", + "$id": "2575", "kind": "string", "type": { "$ref": "205" @@ -18618,7 +18645,7 @@ "value": "2021-01-01T00:26:00Z" }, { - "$id": "2567", + "$id": "2576", "kind": "string", "type": { "$ref": "205" @@ -18626,7 +18653,7 @@ "value": "2021-01-01T00:27:00Z" }, { - "$id": "2568", + "$id": "2577", "kind": "string", "type": { "$ref": "205" @@ -18634,7 +18661,7 @@ "value": "2021-01-01T00:28:00Z" }, { - "$id": "2569", + "$id": "2578", "kind": "string", "type": { "$ref": "205" @@ -18644,14 +18671,14 @@ ] }, "values": { - "$id": "2570", + "$id": "2579", "kind": "array", "type": { "$ref": "207" }, "value": [ { - "$id": "2571", + "$id": "2580", "kind": "number", "type": { "$ref": "208" @@ -18659,7 +18686,7 @@ "value": 0.4030756879437628 }, { - "$id": "2572", + "$id": "2581", "kind": "number", "type": { "$ref": "208" @@ -18667,7 +18694,7 @@ "value": 0.15526889968448554 }, { - "$id": "2573", + "$id": "2582", "kind": "number", "type": { "$ref": "208" @@ -18675,7 +18702,7 @@ "value": 0.36352226408981103 }, { - "$id": "2574", + "$id": "2583", "kind": "number", "type": { "$ref": "208" @@ -18683,7 +18710,7 @@ "value": 0.6051200637229004 }, { - "$id": "2575", + "$id": "2584", "kind": "number", "type": { "$ref": "208" @@ -18691,7 +18718,7 @@ "value": 0.8516795018476276 }, { - "$id": "2576", + "$id": "2585", "kind": "number", "type": { "$ref": "208" @@ -18699,7 +18726,7 @@ "value": 0.2645605735279929 }, { - "$id": "2577", + "$id": "2586", "kind": "number", "type": { "$ref": "208" @@ -18707,7 +18734,7 @@ "value": 0.6810875830037345 }, { - "$id": "2578", + "$id": "2587", "kind": "number", "type": { "$ref": "208" @@ -18715,7 +18742,7 @@ "value": 0.9165894221681316 }, { - "$id": "2579", + "$id": "2588", "kind": "number", "type": { "$ref": "208" @@ -18723,7 +18750,7 @@ "value": 0.700783245230424 }, { - "$id": "2580", + "$id": "2589", "kind": "number", "type": { "$ref": "208" @@ -18731,7 +18758,7 @@ "value": 0.5624155469940331 }, { - "$id": "2581", + "$id": "2590", "kind": "number", "type": { "$ref": "208" @@ -18739,7 +18766,7 @@ "value": 0.6277289685127893 }, { - "$id": "2582", + "$id": "2591", "kind": "number", "type": { "$ref": "208" @@ -18747,7 +18774,7 @@ "value": 0.15992056539730204 }, { - "$id": "2583", + "$id": "2592", "kind": "number", "type": { "$ref": "208" @@ -18755,7 +18782,7 @@ "value": 0.6020964482827594 }, { - "$id": "2584", + "$id": "2593", "kind": "number", "type": { "$ref": "208" @@ -18763,7 +18790,7 @@ "value": 0.35937967753105915 }, { - "$id": "2585", + "$id": "2594", "kind": "number", "type": { "$ref": "208" @@ -18771,7 +18798,7 @@ "value": 0.8731686034848609 }, { - "$id": "2586", + "$id": "2595", "kind": "number", "type": { "$ref": "208" @@ -18779,7 +18806,7 @@ "value": 0.20301549117588935 }, { - "$id": "2587", + "$id": "2596", "kind": "number", "type": { "$ref": "208" @@ -18787,7 +18814,7 @@ "value": 0.029261872151168933 }, { - "$id": "2588", + "$id": "2597", "kind": "number", "type": { "$ref": "208" @@ -18795,7 +18822,7 @@ "value": 0.6261499548828445 }, { - "$id": "2589", + "$id": "2598", "kind": "number", "type": { "$ref": "208" @@ -18803,7 +18830,7 @@ "value": 0.45850782028563386 }, { - "$id": "2590", + "$id": "2599", "kind": "number", "type": { "$ref": "208" @@ -18811,7 +18838,7 @@ "value": 0.8275006940083313 }, { - "$id": "2591", + "$id": "2600", "kind": "number", "type": { "$ref": "208" @@ -18819,7 +18846,7 @@ "value": 0.032760268834037376 }, { - "$id": "2592", + "$id": "2601", "kind": "number", "type": { "$ref": "208" @@ -18827,7 +18854,7 @@ "value": 0.4485202784055029 }, { - "$id": "2593", + "$id": "2602", "kind": "number", "type": { "$ref": "208" @@ -18835,7 +18862,7 @@ "value": 0.8915691008748384 }, { - "$id": "2594", + "$id": "2603", "kind": "number", "type": { "$ref": "208" @@ -18843,7 +18870,7 @@ "value": 0.891669051517807 }, { - "$id": "2595", + "$id": "2604", "kind": "number", "type": { "$ref": "208" @@ -18851,7 +18878,7 @@ "value": 0.9469979353323046 }, { - "$id": "2596", + "$id": "2605", "kind": "number", "type": { "$ref": "208" @@ -18859,7 +18886,7 @@ "value": 0.115293087370132 }, { - "$id": "2597", + "$id": "2606", "kind": "number", "type": { "$ref": "208" @@ -18867,7 +18894,7 @@ "value": 0.08818772518459506 }, { - "$id": "2598", + "$id": "2607", "kind": "number", "type": { "$ref": "208" @@ -18875,7 +18902,7 @@ "value": 0.7426286620589166 }, { - "$id": "2599", + "$id": "2608", "kind": "number", "type": { "$ref": "208" @@ -18883,7 +18910,7 @@ "value": 0.32372247468990756 }, { - "$id": "2600", + "$id": "2609", "kind": "number", "type": { "$ref": "208" @@ -18897,7 +18924,7 @@ ] }, "topContributorCount": { - "$id": "2601", + "$id": "2610", "kind": "number", "type": { "$ref": "210" @@ -18907,30 +18934,33 @@ } } } - ] + ], + "responses": { + "$id": "2611" + } } ] } ], "Protocol": { - "$id": "2602" + "$id": "2612" }, "Parent": "AnomalyDetectorClient", "Parameters": [ { - "$ref": "2160" + "$ref": "2163" }, { - "$ref": "2162" + "$ref": "2165" } ], "Decorators": [] } ], "Auth": { - "$id": "2603", + "$id": "2613", "ApiKey": { - "$id": "2604", + "$id": "2614", "Name": "Ocp-Apim-Subscription-Key" } } diff --git a/src/TypeSpec.Extension/Emitter.Csharp/package.json b/src/TypeSpec.Extension/Emitter.Csharp/package.json index 9263077019b..88ce669662c 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/package.json +++ b/src/TypeSpec.Extension/Emitter.Csharp/package.json @@ -36,7 +36,7 @@ "dependencies": { "@autorest/csharp": "3.0.0-beta.20240625.4", "json-serialize-refs": "0.1.0-0", - "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2Nzc0NS9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240820.33.tgz" + "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2Nzk3MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240821.3.tgz" }, "peerDependencies": { "@azure-tools/typespec-azure-core": ">=0.36.0 <1.0.0", From de0800928bba0e65fa8d193a019d344e1a408c19 Mon Sep 17 00:00:00 2001 From: Arcturus Zhang Date: Thu, 22 Aug 2024 17:07:14 +0800 Subject: [PATCH 27/27] bump to official version --- package-lock.json | 13 ++++++++----- src/TypeSpec.Extension/Emitter.Csharp/package.json | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index e74177b387a..e732efaa37e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2233,8 +2233,9 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "0.1.9-alpha.20240821.3", - "resolved": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2Nzk3MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240821.3.tgz", + "version": "0.1.9-alpha.20240822.1", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20240822.1.tgz", + "integrity": "sha512-WWeLdPzjJObWcIzX/9WUcNyAIRhZGWDsJ2eCSZc69ePf8Rs4M7KpknJEakuCDjEgey7bAj6RTcH16nhhYJJ4CQ==", "dev": true, "dependencies": { "json-serialize-refs": "0.1.0-0" @@ -8122,7 +8123,7 @@ "license": "MIT", "dependencies": { "@autorest/csharp": "3.0.0-beta.20240625.4", - "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2Nzk3MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240821.3.tgz", + "@typespec/http-client-csharp": "0.1.9-alpha.20240822.1", "json-serialize-refs": "0.1.0-0" }, "devDependencies": { @@ -8475,7 +8476,7 @@ "@types/prettier": "^2.6.3", "@typespec/compiler": "0.59.0", "@typespec/http": "0.59.0", - "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2Nzk3MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240821.3.tgz", + "@typespec/http-client-csharp": "0.1.9-alpha.20240822.1", "@typespec/json-schema": "0.59.0", "@typespec/library-linter": "0.59.0", "@typespec/openapi": "0.59.0", @@ -9664,7 +9665,9 @@ "requires": {} }, "@typespec/http-client-csharp": { - "version": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2Nzk3MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240821.3.tgz", + "version": "0.1.9-alpha.20240822.1", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-0.1.9-alpha.20240822.1.tgz", + "integrity": "sha512-WWeLdPzjJObWcIzX/9WUcNyAIRhZGWDsJ2eCSZc69ePf8Rs4M7KpknJEakuCDjEgey7bAj6RTcH16nhhYJJ4CQ==", "dev": true, "requires": { "json-serialize-refs": "0.1.0-0" diff --git a/src/TypeSpec.Extension/Emitter.Csharp/package.json b/src/TypeSpec.Extension/Emitter.Csharp/package.json index 88ce669662c..fc4a1e215cd 100644 --- a/src/TypeSpec.Extension/Emitter.Csharp/package.json +++ b/src/TypeSpec.Extension/Emitter.Csharp/package.json @@ -36,7 +36,7 @@ "dependencies": { "@autorest/csharp": "3.0.0-beta.20240625.4", "json-serialize-refs": "0.1.0-0", - "@typespec/http-client-csharp": "https://artprodcus3.artifacts.visualstudio.com/A0fb41ef4-5012-48a9-bf39-4ee3de03ee35/29ec6040-b234-4e31-b139-33dc4287b756/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6dXJlLXNkay9wcm9qZWN0SWQvMjllYzYwNDAtYjIzNC00ZTMxLWIxMzktMzNkYzQyODdiNzU2L2J1aWxkSWQvNDA2Nzk3MC9hcnRpZmFjdE5hbWUvYnVpbGRfYXJ0aWZhY3RzX2NzaGFycA2/content?format=file&subPath=%2fpackages%2ftypespec-http-client-csharp-0.1.9-alpha.20240821.3.tgz" + "@typespec/http-client-csharp": "0.1.9-alpha.20240822.1" }, "peerDependencies": { "@azure-tools/typespec-azure-core": ">=0.36.0 <1.0.0",